From: Nicolas Boisselier Date: Wed, 1 Jul 2015 00:04:42 +0000 (+0100) Subject: improvment X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=80bc47099f919c92d9fa40999788fcca84c0588c;p=nb.git improvment --- diff --git a/lib/php/test.php b/lib/php/test.php new file mode 100644 index 00000000..68c0fb41 --- /dev/null +++ b/lib/php/test.php @@ -0,0 +1,56 @@ + 'A'); +if (isset($a['a'])) echo "OK\n"; +echo realpath('lib/php/default.php')."\n"; +*/ + +/* +print_r(parse_str('first=value&arr[]=foo+bar&arr[]=baz')); +echo $first; +exit; +*/ + +function _f1() { + $var = ''; is_null($var); +} benchmark('_f1'); + +function _f2() { + $var = ''; empty($var); +} benchmark('_f2'); + +function _f3() { + $var = ''; isset($var); +} benchmark('_f3'); + +function _f4() { + stripos('zaza', 'z') == ( strlen('zaza')-strlen('z') ); +} benchmark('_f4'); + +benchmark(); +exit; + +$g = array(); +function _is_set() { + global $g; + return isset($g['a']); +} benchmark('_is_set'); + +function _array_key_exists() { + global $g; + return array_key_exists('a',$g); +} benchmark('_array_key_exists'); + +function _null() { + global $g; + return (@$g['a'] === null); +} benchmark('_null'); + +benchmark(); +?>