3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php /** * @param array $functions An associative array of closures to benchmark * @param int $iterations The number of iterations */ function benchmark($functions, $iterations) { foreach ($functions as $name => $function) { $start = microtime(true); for ($i = 0; $i < $iterations; $i++) { call_user_func($function); } $delta = microtime(true) - $start; echo "$name: " . $delta . "\n"; } } echo "\nBenchmarking \"(array) \$var === \$var\" vs \"is_array(\$var)\" ...\n"; $data = array( 'string', // Not an array array(1, 2, 3), // Small array array_fill(1, 1000, uniqid()) // Large-ish array ); benchmark(array( 'casting' => function () use ($data) { foreach ($data as $d) { $result = (array) $d === $d; } }, 'is_array' => function () use ($data) { foreach ($data as $d) { $result = is_array($d); } } ), 1000); echo "\nBenchmarking \"count(\$var) == 0\" vs \"empty(\$var)\" ...\n"; $data = range(1, 100000); benchmark(array( 'count()' => function () use ($data) { $result = count($data) == 0; }, 'empty()' => function () use ($data) { $result = empty($data); } ), 100000); echo "\nBenchmarking \"array_key_exists(\$key, \$array)\" vs \"\$array[\$key]\" ...\n"; $data = array_fill_keys(range(1, 1000), uniqid()); benchmark(array( 'in_array_keys()' => function () use ($data) { $result = array_key_exists(50, $data) ? : null; }, 'key check' => function () use ($data) { $result = $data[50] ? : null; } ), 100000);
based on rVIuL
Output for 7.2.0
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.0002439022064209 is_array: 0.00014901161193848 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.0056140422821045 empty(): 0.0053589344024658 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.0069940090179443 key check: 0.006087064743042
Output for 7.1.7
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.00014901161193848 is_array: 9.4175338745117E-5 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.0068089962005615 empty(): 0.0055029392242432 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.0068769454956055 key check: 0.0069069862365723
Output for 7.1.6
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.00038909912109375 is_array: 0.00023698806762695 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.015180110931396 empty(): 0.010625123977661 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.012957811355591 key check: 0.011225938796997
Output for 7.1.5
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.00019979476928711 is_array: 0.00011396408081055 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.0090458393096924 empty(): 0.0060641765594482 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.0091109275817871 key check: 0.0070438385009766
Output for 7.1.0
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.00028705596923828 is_array: 0.00017619132995605 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.011277914047241 empty(): 0.0087180137634277 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.010809898376465 key check: 0.0087652206420898
Output for 7.0.20
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.00035715103149414 is_array: 0.00023508071899414 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.014908075332642 empty(): 0.0058009624481201 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.0075850486755371 key check: 0.0074138641357422
Output for 7.0.14
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.00034618377685547 is_array: 0.0002291202545166 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.017291069030762 empty(): 0.012029886245728 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.013641834259033 key check: 0.012008905410767
Output for 7.0.6
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.00029897689819336 is_array: 0.00016999244689941 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.011574029922485 empty(): 0.0087320804595947 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.010632991790771 key check: 0.0087010860443115
Output for 7.0.5
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.0002439022064209 is_array: 0.00015401840209961 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.011264085769653 empty(): 0.0087449550628662 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.011188983917236 key check: 0.0088498592376709
Output for 7.0.4
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.00016307830810547 is_array: 0.00010991096496582 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.0085079669952393 empty(): 0.006256103515625 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.0087218284606934 key check: 0.0068340301513672
Output for 7.0.3
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.00027918815612793 is_array: 0.00017499923706055 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.01115608215332 empty(): 0.0087502002716064 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.010792016983032 key check: 0.0088160037994385
Output for 7.0.2
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.00021195411682129 is_array: 0.00013303756713867 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.0090208053588867 empty(): 0.0072660446166992 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.0089991092681885 key check: 0.0075678825378418
Output for 7.0.1
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.00023508071899414 is_array: 0.00014710426330566 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.010380029678345 empty(): 0.0076210498809814 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.010058879852295 key check: 0.0079851150512695
Output for 7.0.0
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.00025796890258789 is_array: 0.00016498565673828 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.011304140090942 empty(): 0.0085959434509277 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.01078200340271 key check: 0.0089960098266602
Output for 5.6.21
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.032152891159058 is_array: 0.00069594383239746 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.030291795730591 empty(): 0.023980855941772 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.031079053878784 key check: 0.024024963378906
Output for 5.6.20
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.037346124649048 is_array: 0.00071287155151367 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.03216290473938 empty(): 0.025588035583496 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.033699989318848 key check: 0.026081085205078
Output for 5.6.19
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.036174058914185 is_array: 0.0007319450378418 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.031203985214233 empty(): 0.025206804275513 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.032689094543457 key check: 0.025621175765991
Output for 5.6.18
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.031466960906982 is_array: 0.00064897537231445 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.03028392791748 empty(): 0.024395227432251 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.031831026077271 key check: 0.025076866149902
Output for 5.6.17
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.031141042709351 is_array: 0.00073003768920898 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.031001806259155 empty(): 0.025071859359741 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.034523010253906 key check: 0.025462865829468
Output for 5.6.16
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.045360088348389 is_array: 0.00092196464538574 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.030743837356567 empty(): 0.024659872055054 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.032095909118652 key check: 0.025018930435181
Output for 5.6.15
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.0420241355896 is_array: 0.00084590911865234 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.033471822738647 empty(): 0.024815082550049 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.031655073165894 key check: 0.024848937988281
Output for 5.6.14
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.038785934448242 is_array: 0.00082206726074219 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.031337022781372 empty(): 0.024816989898682 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.031825065612793 key check: 0.025018930435181
Output for 5.6.13
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.032087087631226 is_array: 0.00070810317993164 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.030549049377441 empty(): 0.024674892425537 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.03205394744873 key check: 0.025016069412231
Output for 5.6.12
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.044264078140259 is_array: 0.00089001655578613 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.03546404838562 empty(): 0.024646043777466 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.031943082809448 key check: 0.024885892868042
Output for 5.6.11
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.036012887954712 is_array: 0.00073599815368652 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.030428171157837 empty(): 0.024345874786377 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.031711101531982 key check: 0.024695873260498
Output for 5.6.10
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.039758920669556 is_array: 0.00081801414489746 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.033195018768311 empty(): 0.026504039764404 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.034778833389282 key check: 0.027197122573853
Output for 5.6.9
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.045270919799805 is_array: 0.0008690357208252 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.034188985824585 empty(): 0.02521800994873 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.031308889389038 key check: 0.024582862854004
Output for 5.6.8
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.031199932098389 is_array: 0.00068497657775879 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.02933406829834 empty(): 0.023555994033813 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.030416965484619 key check: 0.02376914024353
Output for 5.5.35
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.036471128463745 is_array: 0.00073814392089844 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.031983137130737 empty(): 0.024550914764404 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.034029006958008 key check: 0.02548885345459
Output for 5.5.34
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.040732860565186 is_array: 0.00088810920715332 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.037785053253174 empty(): 0.02479100227356 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.033042907714844 key check: 0.025362014770508
Output for 5.5.33
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.043376922607422 is_array: 0.00083684921264648 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.031946897506714 empty(): 0.024549961090088 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.033262014389038 key check: 0.02495002746582
Output for 5.5.32
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.031349897384644 is_array: 0.00072193145751953 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.033025026321411 empty(): 0.026357173919678 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.032253980636597 key check: 0.024197101593018
Output for 5.5.31
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.043204069137573 is_array: 0.00094199180603027 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.036366939544678 empty(): 0.024762868881226 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.033147811889648 key check: 0.025330066680908
Output for 5.5.30
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.046067953109741 is_array: 0.0009310245513916 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.036062002182007 empty(): 0.025690078735352 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.03352689743042 key check: 0.025058031082153
Output for 5.5.29
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.044683933258057 is_array: 0.00089693069458008 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.035429000854492 empty(): 0.026547193527222 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.033218145370483 key check: 0.025554895401001
Output for 5.5.28
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.044633865356445 is_array: 0.00091791152954102 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.035941123962402 empty(): 0.0258469581604 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.032941102981567 key check: 0.025495052337646
Output for 5.5.27
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.044704914093018 is_array: 0.00092315673828125 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.035897970199585 empty(): 0.025950193405151 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.033194065093994 key check: 0.024965047836304
Output for 5.5.26
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.042859077453613 is_array: 0.0009009838104248 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.033277034759521 empty(): 0.02597713470459 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.035107135772705 key check: 0.026803016662598
Output for 5.5.25
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.038080930709839 is_array: 0.00087618827819824 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.03593897819519 empty(): 0.027821063995361 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.03745698928833 key check: 0.027324914932251
Output for 5.5.24
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.037381887435913 is_array: 0.00076198577880859 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.031743049621582 empty(): 0.025071859359741 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.033696889877319 key check: 0.025556087493896
Output for 5.4.45
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.050027847290039 is_array: 0.0010812282562256 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.15905904769897 empty(): 0.037158966064453 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.054058074951172 key check: 0.039821147918701
Output for 5.4.44
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.048778057098389 is_array: 0.0010387897491455 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.058971166610718 empty(): 0.045894145965576 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.047415971755981 key check: 0.065968990325928
Output for 5.4.43
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.049875020980835 is_array: 0.0013267993927002 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.051833868026733 empty(): 0.042354106903076 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.052091836929321 key check: 0.039109945297241
Output for 5.4.42
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.047430992126465 is_array: 0.0010550022125244 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.046450853347778 empty(): 0.034523010253906 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.054177045822144 key check: 0.040426969528198
Output for 5.4.41
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.077176809310913 is_array: 0.0016539096832275 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.054995059967041 empty(): 0.034753084182739 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.082489967346191 key check: 0.070584058761597
Output for 5.4.40
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.061892032623291 is_array: 0.0013930797576904 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.05181097984314 empty(): 0.034639835357666 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.048238039016724 key check: 0.038034915924072
Output for 5.4.39
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.049798011779785 is_array: 0.0010509490966797 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.051332950592041 empty(): 0.040485858917236 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.081802845001221 key check: 0.099785804748535
Output for 5.4.38
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.048839807510376 is_array: 0.0012831687927246 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.062750101089478 empty(): 0.037142992019653 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.060059070587158 key check: 0.058567047119141
Output for 5.4.37
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.055778026580811 is_array: 0.0012218952178955 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.049889087677002 empty(): 0.035583019256592 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.052553176879883 key check: 0.03882908821106
Output for 5.4.36
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.05117392539978 is_array: 0.0011861324310303 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.057822942733765 empty(): 0.045783996582031 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.066076040267944 key check: 0.05019998550415
Output for 5.4.35
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.049901962280273 is_array: 0.0010859966278076 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.053943157196045 empty(): 0.036830902099609 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.055288076400757 key check: 0.039398908615112
Output for 5.4.34
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.048435926437378 is_array: 0.0012722015380859 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.051517009735107 empty(): 0.071243047714233 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.053802013397217 key check: 0.038672924041748
Output for 5.4.32
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.03567910194397 is_array: 0.00078105926513672 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.037060022354126 empty(): 0.02548885345459 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.035212993621826 key check: 0.027688980102539
Output for 5.4.31
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.035298109054565 is_array: 0.00078701972961426 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.035291194915771 empty(): 0.02645206451416 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.038007974624634 key check: 0.029736995697021
Output for 5.4.30
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.034651041030884 is_array: 0.00085306167602539 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.038805961608887 empty(): 0.027777194976807 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.035727024078369 key check: 0.028357028961182
Output for 5.4.29
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.035109043121338 is_array: 0.00078392028808594 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.03534197807312 empty(): 0.025430917739868 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.039102077484131 key check: 0.028974056243896
Output for 5.4.28
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.03783106803894 is_array: 0.00098299980163574 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.040143966674805 empty(): 0.029843807220459 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.040385007858276 key check: 0.03033709526062
Output for 5.4.27
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.034188985824585 is_array: 0.00074887275695801 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.037411212921143 empty(): 0.025783061981201 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.040644884109497 key check: 0.030509948730469
Output for 5.4.26
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.036120891571045 is_array: 0.00080299377441406 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.036852121353149 empty(): 0.029218912124634 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.037313938140869 key check: 0.029052972793579
Output for 5.4.25
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.036899089813232 is_array: 0.00087308883666992 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.037626981735229 empty(): 0.031014919281006 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.039041042327881 key check: 0.032432794570923
Output for 5.4.24
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.036026954650879 is_array: 0.0008549690246582 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.035080909729004 empty(): 0.029294967651367 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.041065216064453 key check: 0.029086828231812
Output for 5.4.23
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.037490129470825 is_array: 0.00087594985961914 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.036932945251465 empty(): 0.028948068618774 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.038399934768677 key check: 0.030177116394043
Output for 5.4.22
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.036686897277832 is_array: 0.00077700614929199 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.036079883575439 empty(): 0.029076099395752 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.039093971252441 key check: 0.031142950057983
Output for 5.4.21
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.035102844238281 is_array: 0.00084280967712402 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.034937858581543 empty(): 0.025834798812866 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.03565788269043 key check: 0.029107093811035
Output for 5.4.20
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.0365149974823 is_array: 0.00078105926513672 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.043246984481812 empty(): 0.026415109634399 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.036216974258423 key check: 0.030386924743652
Output for 5.4.19
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.035912990570068 is_array: 0.00081014633178711 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.038970947265625 empty(): 0.029142141342163 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.040992975234985 key check: 0.02991795539856
Output for 5.4.18
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.0436110496521 is_array: 0.00085616111755371 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.037242889404297 empty(): 0.028403043746948 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.039464950561523 key check: 0.03593897819519
Output for 5.4.17
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.03657603263855 is_array: 0.00076007843017578 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.037305116653442 empty(): 0.026701927185059 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.037503004074097 key check: 0.029991865158081
Output for 5.4.16
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.035964012145996 is_array: 0.00079107284545898 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.037372827529907 empty(): 0.026185989379883 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.036190986633301 key check: 0.028988122940063
Output for 5.4.15
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.038305044174194 is_array: 0.00077009201049805 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.03363299369812 empty(): 0.025660037994385 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.036784887313843 key check: 0.028403043746948
Output for 5.4.14
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.034433126449585 is_array: 0.00080704689025879 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.037889003753662 empty(): 0.027766942977905 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.039315938949585 key check: 0.030864000320435
Output for 5.4.13
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.035475015640259 is_array: 0.00085997581481934 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.038744926452637 empty(): 0.031063079833984 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.038012981414795 key check: 0.032459020614624
Output for 5.4.12
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.043927907943726 is_array: 0.00082802772521973 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.0400230884552 empty(): 0.030272006988525 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.040163040161133 key check: 0.030889987945557
Output for 5.4.11
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.036988973617554 is_array: 0.00078201293945312 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.040956020355225 empty(): 0.030919075012207 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.041904926300049 key check: 0.03261399269104
Output for 5.4.10
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.038159132003784 is_array: 0.0008549690246582 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.039719104766846 empty(): 0.028258085250854 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.057025909423828 key check: 0.064800024032593
Output for 5.4.9
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.036840915679932 is_array: 0.00089097023010254 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.044784069061279 empty(): 0.031991004943848 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.040594816207886 key check: 0.032109975814819
Output for 5.4.8
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.036223888397217 is_array: 0.00080108642578125 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.037905931472778 empty(): 0.029392957687378 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.038843154907227 key check: 0.030026912689209
Output for 5.4.7
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.036326885223389 is_array: 0.00088405609130859 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.041047096252441 empty(): 0.029966115951538 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.042572975158691 key check: 0.032072067260742
Output for 5.4.6
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.037054061889648 is_array: 0.00086593627929688 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.044009923934937 empty(): 0.035542011260986 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.045842170715332 key check: 0.037261962890625
Output for 5.4.5
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.037007093429565 is_array: 0.00085806846618652 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.038671016693115 empty(): 0.031121969223022 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.042875051498413 key check: 0.031250953674316
Output for 5.4.4
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.037867069244385 is_array: 0.00081801414489746 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.050146102905273 empty(): 0.029423952102661 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.039709091186523 key check: 0.030924797058105
Output for 5.4.3
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.038158893585205 is_array: 0.00085091590881348 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.044013023376465 empty(): 0.028053045272827 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.044548034667969 key check: 0.032074928283691
Output for 5.4.2
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.037708044052124 is_array: 0.0008690357208252 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.038259029388428 empty(): 0.028603076934814 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.052983999252319 key check: 0.030931949615479
Output for 5.4.1
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.038149833679199 is_array: 0.00081706047058105 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.043678998947144 empty(): 0.027810096740723 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.043560028076172 key check: 0.0311119556427
Output for 5.4.0
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.03726601600647 is_array: 0.00085210800170898 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.0367271900177 empty(): 0.028861045837402 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.036160945892334 key check: 0.03025484085083
Output for 5.3.29
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.032783031463623 is_array: 0.00093507766723633 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.046467065811157 empty(): 0.033150911331177 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.043329954147339 key check: 0.033595085144043
Output for 5.3.28
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.033284902572632 is_array: 0.00089597702026367 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.041918992996216 empty(): 0.029624938964844 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.052304029464722 key check: 0.035482168197632
Output for 5.3.27
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.033809900283813 is_array: 0.00094103813171387 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.064085960388184 empty(): 0.036607027053833 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.050382137298584 key check: 0.03750205039978
Output for 5.3.26
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.033540964126587 is_array: 0.00094890594482422 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.059568166732788 empty(): 0.029042959213257 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.043510913848877 key check: 0.033962965011597
Output for 5.3.25
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.033981800079346 is_array: 0.00089097023010254 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.041593074798584 empty(): 0.029140949249268 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.04305100440979 key check: 0.031980991363525
Output for 5.3.24
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.034492969512939 is_array: 0.00095701217651367 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.050050020217896 empty(): 0.035210132598877 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.053362131118774 key check: 0.037261009216309
Output for 5.3.23
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.033972024917603 is_array: 0.00086307525634766 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.042546987533569 empty(): 0.030647993087769 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.043116092681885 key check: 0.034298896789551
Output for 5.3.22
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.035173177719116 is_array: 0.00097799301147461 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.048158884048462 empty(): 0.031255006790161 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.048486948013306 key check: 0.035505056381226
Output for 5.3.21
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.034133195877075 is_array: 0.0010571479797363 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.057492017745972 empty(): 0.037841081619263 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.056986093521118 key check: 0.040008068084717
Output for 5.3.20
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.034724950790405 is_array: 0.00091385841369629 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.051270961761475 empty(): 0.033885955810547 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.047360897064209 key check: 0.036448001861572
Output for 5.3.19
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.035968065261841 is_array: 0.00095582008361816 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.054878950119019 empty(): 0.035395860671997 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.049829959869385 key check: 0.039407014846802
Output for 5.3.18
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.037543058395386 is_array: 0.00095891952514648 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.053069114685059 empty(): 0.037279844284058 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.050607919692993 key check: 0.040323972702026
Output for 5.3.17
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.035017013549805 is_array: 0.0011529922485352 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.057059049606323 empty(): 0.037868022918701 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.051821947097778 key check: 0.040872097015381
Output for 5.3.16
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.03351092338562 is_array: 0.00089287757873535 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.051247119903564 empty(): 0.033022880554199 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.046124935150146 key check: 0.038744926452637
Output for 5.3.15
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.033600091934204 is_array: 0.00088095664978027 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.055288791656494 empty(): 0.031419992446899 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.044421911239624 key check: 0.03870701789856
Output for 5.3.14
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.034372806549072 is_array: 0.00090694427490234 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.049737930297852 empty(): 0.035673856735229 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.049992084503174 key check: 0.037876129150391
Output for 5.3.13
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.034115076065063 is_array: 0.0009009838104248 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.051556825637817 empty(): 0.032886028289795 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.047667026519775 key check: 0.043913125991821
Output for 5.3.12
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.034096956253052 is_array: 0.00095200538635254 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.045916080474854 empty(): 0.032694816589355 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.048607110977173 key check: 0.038899898529053
Output for 5.3.11
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.035201787948608 is_array: 0.00090980529785156 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.043592929840088 empty(): 0.03030800819397 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.044567108154297 key check: 0.033889055252075
Output for 5.3.10
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.034702062606812 is_array: 0.00094008445739746 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.047333002090454 empty(): 0.02982497215271 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.04453706741333 key check: 0.033087015151978
Output for 5.3.9
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.039345979690552 is_array: 0.0016739368438721 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.042685031890869 empty(): 0.03472900390625 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.044515132904053 key check: 0.034888982772827
Output for 5.3.8
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.038372993469238 is_array: 0.00091290473937988 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.051558017730713 empty(): 0.03761100769043 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.044323921203613 key check: 0.044429063796997
Output for 5.3.7
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.062491893768311 is_array: 0.0018091201782227 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.074918985366821 empty(): 0.036093950271606 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.083042860031128 key check: 0.075448989868164
Output for 5.3.6
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.048331022262573 is_array: 0.00092506408691406 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.043820858001709 empty(): 0.03534197807312 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.065801858901978 key check: 0.043072938919067
Output for 5.3.5
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.036597967147827 is_array: 0.00089597702026367 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.051630973815918 empty(): 0.033952951431274 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.061851978302002 key check: 0.045742988586426
Output for 5.3.4
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.036449193954468 is_array: 0.00085783004760742 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.047436952590942 empty(): 0.028870105743408 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.049247026443481 key check: 0.051700115203857
Output for 5.3.3
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.05833101272583 is_array: 0.0018250942230225 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.073447227478027 empty(): 0.044567108154297 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.043357849121094 key check: 0.054054021835327
Output for 5.3.2
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.036802053451538 is_array: 0.00088715553283691 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.050004005432129 empty(): 0.035983085632324 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.050540208816528 key check: 0.040149927139282
Output for 5.3.1
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.036298990249634 is_array: 0.0014629364013672 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.048895835876465 empty(): 0.034618139266968 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.048846006393433 key check: 0.036993980407715
Output for 5.3.0
Benchmarking "(array) $var === $var" vs "is_array($var)" ... casting: 0.035706043243408 is_array: 0.00092983245849609 Benchmarking "count($var) == 0" vs "empty($var)" ... count(): 0.044249057769775 empty(): 0.031416893005371 Benchmarking "array_key_exists($key, $array)" vs "$array[$key]" ... in_array_keys(): 0.046308040618896 key check: 0.034543037414551
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION in /in/DQ2fb on line 32
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_FUNCTION in /in/DQ2fb on line 32
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/DQ2fb on line 32
Process exited with code 255.