3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php namespace A; $a = [['x'], ['y'], ['z1'], 1, 2, 3, 4, 5, 'some text']; $time = microtime(true); for ($i=0; $i<1000000; $i++) { \count($a); } echo (microtime(true) - $time) . "\n"; $time = microtime(true); for ($i=0; $i<1000000; $i++) { count($a); } echo (microtime(true) - $time) . "\n";
based on ZcvPF
Output for 7.3.3
0.01896595954895 0.02916693687439
Output for 7.3.2
0.016751050949097 0.018136024475098
Output for 7.3.1
0.018748998641968 0.026398181915283
Output for 7.3.0
0.018749952316284 0.030716896057129
Output for 7.2.16
0.019397020339966 0.029992818832397
Output for 7.2.15
0.017893075942993 0.025097846984863
Output for 7.2.14
0.018777132034302 0.029330015182495
Output for 7.2.13
0.015290021896362 0.020678043365479
Output for 7.2.12
0.01644492149353 0.027151823043823
Output for 7.2.11
0.018975019454956 0.030789136886597
Output for 7.2.10
0.018041133880615 0.020543098449707
Output for 7.2.9
0.014365911483765 0.019991874694824
Output for 7.2.8
0.020193099975586 0.033003091812134
Output for 7.2.7
0.016276121139526 0.025601148605347
Output for 7.2.6
0.019022941589355 0.032718896865845
Output for 7.2.5
0.025671005249023 0.01954197883606
Output for 7.2.4
0.014788150787354 0.021696805953979
Output for 7.2.3
0.018011093139648 0.020319938659668
Output for 7.2.2
0.018535137176514 0.030879020690918
Output for 7.2.1
0.019784927368164 0.034878969192505
Output for 7.2.0
0.018733024597168 0.032727003097534
Output for 7.1.27
0.035959005355835 0.035367012023926
Output for 7.1.26
0.034497976303101 0.034964799880981
Output for 7.1.25
0.033858060836792 0.034191131591797