1. Biến - Khai báo khởi tạo biến định kiểu nhanh hơn 376% so với không định kiểu. - Hằng chậm hơn 146% so với biến. - Biến cục bộ nhanh hơn 9.9% biến toàn cục. 2. Hàm làm việc với chuỗi - 'string' nhan hơn 0.26% so với "string" - "String" nhanh hơn 4% so với cú pháp HEREDOC - "Stringn" nhanh hơn 108% so với 'String'."n" - 'String'.$var nhanh hơn 28% so với "String$var" - 'string '.$var.' string' nhanh hơn 55% so với sprintf('string %s string', $var) - "n" nhanh hơn 70% so với chr(10) - strnatcmp() nhanh hơn 4.95% so với strcmp() - strcasecmp() nhanh hơn 45% so với preg_match() - strcasecmp() nhanh hơn 6.6% so với strtoupper($string) == "STRING" - strcasecmp() nhanh hơn 13% so với strnatcasecmp() - strtr($string, $string1, $string2) nhanh hơn 10% so với str_replace() - str_replace() nhanh hơn 161% so với strtr($string, $array) - stristr() nhanh hơn 10% so với stripos() - strpos() nhanh hơn 9.7% so với strstr() - isset($str{5}) nhanh hơn 176% so với strlen($str) > 5 - str_replace($str, $str, $str) hai lần nhanh hơn 17% so với str_replace(array, array, string) - list() = explode() nhanh hơn 13% so với substr($str, strpos($str)) 3. Hàm làm việc với số - ++$int nhanh hơn 10% so với $int++ - (float) nhanh hơn 48% so với settype($var, 'float') 4. Hàm làm việc với mảng - list() = $array; nhanh hơn 3.4% so với gán từng giá trị - in_array() nhanh hơn 6% so với array_search - isset($array[$key]) nhanh hơn 230% so với array_key_exists() - !empty($array) nhanh hơn 66% so với count($array) 5. Hàm xuất - echo nhanh hơn 5% so với print() - echo ' '.' ' nhanh hơn 0.44% so với echo ' ',' ' 6. Hàm, phương thức và cách thức gọi - call_user_func() chậm hơn 54% so với gọi trực tiếp hàm - call_user_func() chậm hơn 59% so với gọi phương thức tĩnh (static method) - call_user_func() chậm hơn 65% so với gọi phương thức (của một đối tượng) - function() nhanh hơn 119% so với static::method() - $this->method() nhanh hơn 116% so với static::method() - declared static::method() nhanh hơn 93% so với static::method() 7. Hàm, phương thức - Truyền tham trị nhanh hơn 3% so với truyền tham chiếu - Không tham chiếu (no reference ) nhanh hơn 1.7% so với tham chiếu (Return by reference) 8. Làm việc với File - Scandir() nhanh hơn 4% so với opendir(), readdir(), closedir() - file_get_contents() nhanh hơn 52% so với fopen(), fread(), fclose() - file_get_contents() nhanh hơn 39% so với implode("n", file()) 9. Hàm ghi bộ đệm (Cache) - xcache_set() nhanh hơn 1,645% so với file_put_contents() - xcache_set() nhanh hơn 646% so với memcache->set() - xcache_get() nhanh hơn 1,312% so với memcache->get() 10. Hàm (Tổng quát) - if elseif else nhanh hơn 0.78 % so với switch - @Error supression (bỏ báo lỗi nếu có) chậm hơn 235% so với without - $_SERVER['REQUEST_TIME'] nhanh hơn 59% so với time() - min(array) nhanh hơn 16% so với min(int, int) - require_once() nhanh hơn 24% so với include() - require_once() nhanh bằng include_once() - include('đường dẫn tương đối') nhanh hơn 37% so với include('đường dẫn tuyệt đối') 11. Chuỗi chính quy (regular expressions) - str_replace() nhanh hơn 40% so với preg_replace() - ereg('regex') nhanh hơn 17% so với preg_match('/regex/') - preg_match('/regex/i') nhanh hơn 68% so với eregi('regex') 12. Top 10 các hàm có ích nhất - đắt giá nhất
Nguồn : st internet
|
Thursday, August 14, 2014
New
About Unknown
SoraTemplates is a blogger resources site is a provider of high quality blogger template with premium looking layout and robust design. The main mission of SoraTemplates is to provide the best quality blogger templates.
Tiện Ích
Nhãn:
Tiện Ích
Subscribe to:
Post Comments (Atom)
We will help propel your business to success by providing you quality and Mobile apps development company.
ReplyDeletemobile application development company
software development company
IT outsourcing company
software outsourcing company
healthcare mobile app developer
luyện thi toeic