2012年7月9日

摘要: 非捕获组的就是为了提高匹配效率。EX:$str = "abcd";preg_match('@(?:a)(b)(c)(d)@',$str,$m);var_dump($m);DISPLAY:array(4) { [0]=> string(4) "abcd" [1]=> string(1) "b" [2]=> string(1) "c" [3]=> string(1) "d"} 阅读全文
posted @ 2012-07-09 16:14 李春寅 阅读(178) 评论(0) 推荐(0) 编辑
 
摘要: class c{ public static function get($str) { echo $str; }}call_user_func(array('c','get'),'a'); 阅读全文
posted @ 2012-07-09 15:46 李春寅 阅读(133) 评论(0) 推荐(0) 编辑
 
摘要: class a { public static function w() { echo __CLASS__.'<br/>'; } public static function e() { static::w(); //self::w(); } } class b extends a { public static function w() { echo __CLASS__; } } b::e(); 阅读全文
posted @ 2012-07-09 11:53 李春寅 阅读(146) 评论(0) 推荐(0) 编辑