3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $isset = true; $array = array(); $notSetArray = array(0=>''); $string = ''; // Test Source function TestEmpty() { $array = array(); $i = 0; /* The Test */ $t = microtime(true); while($i < 2000) { empty($array); ++$i; } echo (microtime(true) - $t); } function TestEmpty2() { $array = array(); $i = 0; /* The Test */ $t = microtime(true); while($i < 2000) { (! $array ); ++$i; } echo (microtime(true) - $t); } function TestEmpty3() { $array = array(); $i = 0; /* The Test */ $t = microtime(true); while($i < 2000) { ($array !== []); ++$i; } echo (microtime(true) - $t); } TestEmpty(); echo "\n\n"; TestEmpty2(); echo "\n\n"; TestEmpty3();
Output for 7.1.0
4.8160552978516E-5 3.0994415283203E-5 7.2002410888672E-5
Output for 7.0.14
4.887580871582E-5 3.4093856811523E-5 7.4863433837891E-5
Output for 7.0.6
6.1988830566406E-5 4.6014785766602E-5 5.9127807617188E-5
Output for 7.0.5
4.9114227294922E-5 4.3869018554688E-5 6.7949295043945E-5
Output for 7.0.4
2.598762512207E-5 2.5033950805664E-5 3.8862228393555E-5
Output for 7.0.3
2.598762512207E-5 3.0040740966797E-5 4.7206878662109E-5
Output for 7.0.2
3.6954879760742E-5 3.0994415283203E-5 4.9829483032227E-5
Output for 7.0.1
3.9100646972656E-5 3.1948089599609E-5 5.1975250244141E-5
Output for 7.0.0
2.598762512207E-5 2.4080276489258E-5 3.6001205444336E-5
Output for hhvm-3.12.0
0.00012516975402832 0.00016093254089355 0.00019693374633789
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.28
7.3909759521484E-5 7.6055526733398E-5 0.00016593933105469
Output for 5.6.21
6.8187713623047E-5 7.1048736572266E-5 0.00014495849609375
Output for 5.6.20
4.887580871582E-5 6.5088272094727E-5 0.00010800361633301
Output for 5.6.19
5.1021575927734E-5 4.5061111450195E-5 9.2029571533203E-5
Output for 5.6.18
4.3869018554688E-5 4.5061111450195E-5 9.2029571533203E-5
Output for 5.6.17
6.103515625E-5 7.3909759521484E-5 0.00013208389282227
Output for 5.6.16
4.2915344238281E-5 4.5061111450195E-5 9.2029571533203E-5
Output for 5.6.15
7.1048736572266E-5 7.3909759521484E-5 0.0001530647277832
Output for 5.6.14
4.3869018554688E-5 4.6968460083008E-5 0.00010085105895996
Output for 5.6.13
4.4107437133789E-5 5.6982040405273E-5 9.608268737793E-5
Output for 5.6.12
4.4107437133789E-5 4.5061111450195E-5 9.2029571533203E-5
Output for 5.6.11
8.2015991210938E-5 7.0810317993164E-5 0.00014495849609375
Output for 5.6.10
8.1062316894531E-5 7.5101852416992E-5 0.00015401840209961
Output for 5.6.9
6.5088272094727E-5 5.1021575927734E-5 0.00013184547424316
Output for 5.6.8
5.9127807617188E-5 6.103515625E-5 0.00013089179992676
Output for 5.6.7
4.4822692871094E-5 5.5074691772461E-5 9.5129013061523E-5
Output for 5.5.35
5.6982040405273E-5 6.1988830566406E-5 0.00012111663818359
Output for 5.5.34
4.4107437133789E-5 4.7922134399414E-5 0.0001070499420166
Output for 5.5.33
4.6014785766602E-5 4.7922134399414E-5 9.9897384643555E-5
Output for 5.5.32
6.9141387939453E-5 5.2928924560547E-5 0.00015783309936523
Output for 5.5.31
6.2942504882812E-5 6.6995620727539E-5 0.00013589859008789
Output for 5.5.30
6.2942504882812E-5 6.6041946411133E-5 0.00013303756713867
Output for 5.5.29
4.2915344238281E-5 6.3896179199219E-5 9.5129013061523E-5
Output for 5.5.28
6.0081481933594E-5 6.3896179199219E-5 0.00012683868408203
Output for 5.5.27
7.1048736572266E-5 8.4161758422852E-5 0.00016093254089355
Output for 5.5.26
6.8902969360352E-5 7.319450378418E-5 0.00014996528625488
Output for 5.5.25
7.1048736572266E-5 7.6055526733398E-5 0.00015115737915039
Output for 5.5.24
7.3909759521484E-5 6.8902969360352E-5 0.00011587142944336
Output for 5.4.45
0.00011682510375977 6.9141387939453E-5 0.00013303756713867
Output for 5.4.44
0.0001528263092041 0.00010395050048828 0.0004119873046875
Output for 5.4.43
6.5088272094727E-5 6.5088272094727E-5 0.00013399124145508
Output for 5.4.42
6.5088272094727E-5 6.4849853515625E-5 0.00014400482177734
Output for 5.4.41
8.2969665527344E-5 8.702278137207E-5 0.00017094612121582
Output for 5.4.40
0.0001070499420166 7.7962875366211E-5 0.00013995170593262
Output for 5.4.39
0.00013613700866699 0.0001368522644043 0.00035214424133301
Output for 5.4.38
6.5088272094727E-5 8.2015991210938E-5 0.00013899803161621
Output for 5.4.37
7.319450378418E-5 0.00019001960754395 0.00019717216491699
Output for 5.4.36
6.3896179199219E-5 6.1988830566406E-5 0.00018215179443359
Output for 5.4.35
6.4849853515625E-5 6.2227249145508E-5 0.0001370906829834
Output for 5.4.34
6.2942504882812E-5 6.3180923461914E-5 0.00018978118896484
Output for 5.4.32
4.7922134399414E-5 5.2928924560547E-5 0.00013303756713867
Output for 5.4.31
4.4822692871094E-5 5.1975250244141E-5 0.0001380443572998
Output for 5.4.30
4.5061111450195E-5 4.6968460083008E-5 0.00011205673217773
Output for 5.4.29
4.6968460083008E-5 4.7922134399414E-5 0.00011420249938965
Output for 5.4.28
7.7009201049805E-5 0.00011491775512695 0.00018501281738281
Output for 5.4.27
8.0108642578125E-5 0.00030803680419922 0.00028181076049805
Output for 5.4.26
8.702278137207E-5 6.9141387939453E-5 0.00016593933105469
Output for 5.4.25
8.0108642578125E-5 8.0108642578125E-5 0.00016498565673828
Output for 5.4.24
7.5101852416992E-5 8.1062316894531E-5 0.00017118453979492
Output for 5.4.23
7.6055526733398E-5 0.00016283988952637 0.0003349781036377
Output for 5.4.22
7.8201293945312E-5 9.4890594482422E-5 0.011283874511719
Output for 5.4.21
7.8916549682617E-5 7.5101852416992E-5 0.00017595291137695
Output for 5.4.20
8.2969665527344E-5 7.9870223999023E-5 0.00017690658569336
Output for 5.4.19
7.4863433837891E-5 7.5817108154297E-5 0.0001680850982666
Output for 5.4.18
7.7009201049805E-5 7.2002410888672E-5 0.00021600723266602
Output for 5.4.17
7.9154968261719E-5 0.00016212463378906 0.010745048522949
Output for 5.4.16
4.6968460083008E-5 7.3909759521484E-5 0.00012302398681641
Output for 5.4.15
4.6968460083008E-5 4.5061111450195E-5 9.8943710327148E-5
Output for 5.4.14
5.793571472168E-5 4.6014785766602E-5 0.00021195411682129
Output for 5.4.13
7.8201293945312E-5 9.2983245849609E-5 0.00018215179443359
Output for 5.4.12
7.8201293945312E-5 0.00017094612121582 0.00030112266540527
Output for 5.4.11
7.8916549682617E-5 9.7990036010742E-5 0.00028085708618164
Output for 5.4.10
5.6028366088867E-5 4.4107437133789E-5 0.00011682510375977
Output for 5.4.9
7.7962875366211E-5 0.00010085105895996 0.00016188621520996
Output for 5.4.8
0.0011920928955078 0.00010204315185547 0.00021505355834961
Output for 5.4.7
8.1062316894531E-5 7.6055526733398E-5 0.0001678466796875
Output for 5.4.6
7.7962875366211E-5 0.00011897087097168 0.00024700164794922
Output for 5.4.5
8.082389831543E-5 8.5830688476562E-5 0.00024700164794922
Output for 5.4.4
8.702278137207E-5 6.9856643676758E-5 0.00016093254089355
Output for 5.4.3
7.7962875366211E-5 9.2029571533203E-5 0.00023102760314941
Output for 5.4.2
4.6968460083008E-5 4.887580871582E-5 0.00011992454528809
Output for 5.4.1
7.7009201049805E-5 7.6055526733398E-5 0.00018310546875
Output for 5.4.0
9.1075897216797E-5 9.7036361694336E-5 0.00033903121948242
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/9EsAl on line 46
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 '[' in /in/9EsAl on line 46
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/9EsAl on line 46
Process exited with code 255.