程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 網頁編程 >> PHP編程 >> 關於PHP編程 >> PHP4.04 新增加了專用的字符函數 Ctype

PHP4.04 新增加了專用的字符函數 Ctype

編輯:關於PHP編程

Character type functions
These functions check whether a character or string falls into a certain character class according to the i current locale.
這些函數根據當前現場的 i 檢查一個字符或字符串是否在一個字符類裡面!

When called with an integer argument these functions behave exactly like their C counterparts.
當使用整數參數調用時,這些函數和 C 裡面的函數完全匹配。

When called with a string argument they will check every character in the string and will only return true if every character in the string matches the requested criteria.
當使用字符串參數,將檢查字符串裡面的每一個字符,如果字符串裡面的每個字符都等同於請求標准時返回 true.

Passing anything else but a string or integer will return false immediately.
傳送非字符串或整數的參數將立即返回 false


Warning
警告:

These functions are new as of PHP 4.0.4 and might change their name in the near future. Suggestions are to change them to ctype_issomething() instead of ctype_somthing() or even to make them part of ext/standard and use their original C-names, although this would possibly lead to further confusion regarding the isset() vs. is_sometype() problem.

這些函數是 php4.04 新增加的。可能在近期改變。建議包括更改 ctype_issomething() 代替 ctype_somthing(),甚至讓他們成為擴展/標准的一部分,和使用他們的原始 C_名字。盡管可能導致將來 isset() 對 is_sometype() 的混亂。



  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved