Edit report at http://bugs.php.net/bug.php?id=15689&edit=1
ID: 15689 Updated by: [email protected] Reported by: Xuefer at 21cn dot com Summary: more variable type should be added -Status: Open +Status: Wont fix Type: Feature/Change Request -Package: Feature/Change Request +Package: *General Issues PHP Version: 4.1.1 Block user comment: N Private report: N New Comment: Rather opposite: We should remove all types and make everything classes and objects. :) Won't happen. Previous Comments: ------------------------------------------------------------------------ [2002-02-23 11:29:38] Xuefer at 21cn dot com php class has no `operator` behave like c++ so, it's quite different between user-defined-object and internal-variable-type i suggest that wide-string type should be added. which behave like wchar_t in vc, but more powerful wide-string is not that mbstring mbstring is an extension not internal type every char of wide-string is wide-char(wchar), both ascii and multibyte-char there's also a bunch of wide-string operating function in i18n mbstring is so complexity that use more cpu-time wide-string take more memory but simple to process samples: $str = "string"; // This is a normal string $wstr = L"string"; // This is a wide-string echo strlen($str); // 6 echo strlen($wstr); // also 6 echo memsize($wstr); // 6 echo memsize($wstr); // 12 echo $str == $wstr; // true echo $str === $wstr; // false "\x20"; // normal string L"\x20"; // wide-string L"\x4c3a"; // wide-string and echo preg_replace(L"/abc/", "def", "abcdef"); should also works for matching wide-string if (strpos(L"abc", L"def") === false) .....; see? quite different from "mbstring" but.. if adding wchar_t support to every string function make it slower, i'd like to have a set of "w" prefix functions such as wstrcmp wstrpos wpreg_replace not "mb" :p if php preferer mbstring rather than wchar_t at least, make mbstring internal, not as extension. when compiled without mbstring, all mbstring-type is processed exactly like normal string. that's all ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=15689&edit=1
