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 = null; $i = 0; /* The Test */ $t = microtime(true); while($i < 2000) { empty($array); ++$i; } echo (microtime(true) - $t); } function TestEmpty2() { $array = null; $i = 0; /* The Test */ $t = microtime(true); while($i < 2000) { (! $array ); ++$i; } echo (microtime(true) - $t); } function TestEmpty3() { $array = null; $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
3.0994415283203E-5 2.0027160644531E-5 4.2915344238281E-5
Output for 7.0.14
4.1961669921875E-5 2.288818359375E-5 5.9843063354492E-5
Output for 7.0.6
3.6001205444336E-5 2.6941299438477E-5 5.1021575927734E-5
Output for 7.0.5
2.7894973754883E-5 2.288818359375E-5 3.814697265625E-5
Output for 7.0.4
3.504753112793E-5 3.6954879760742E-5 5.6982040405273E-5
Output for 7.0.3
3.7193298339844E-5 2.6941299438477E-5 5.1975250244141E-5
Output for 7.0.2
2.5033950805664E-5 2.0027160644531E-5 3.4809112548828E-5
Output for 7.0.1
2.598762512207E-5 2.0980834960938E-5 3.9815902709961E-5
Output for 7.0.0
3.814697265625E-5 4.1007995605469E-5 6.1988830566406E-5
Output for hhvm-3.12.0
0.00012683868408203 0.00012588500976562 0.00014996528625488
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.28
6.6995620727539E-5 6.8902969360352E-5 0.00015592575073242
Output for 5.6.21
6.103515625E-5 6.4849853515625E-5 0.00014305114746094
Output for 5.6.20
5.2928924560547E-5 5.6982040405273E-5 0.00011396408081055
Output for 5.6.19
3.9815902709961E-5 4.1961669921875E-5 8.6069107055664E-5
Output for 5.6.18
4.2915344238281E-5 4.4107437133789E-5 9.7036361694336E-5
Output for 5.6.17
5.3167343139648E-5 7.2002410888672E-5 0.00011706352233887
Output for 5.6.16
4.1007995605469E-5 4.2915344238281E-5 8.8930130004883E-5
Output for 5.6.15
6.4849853515625E-5 6.6995620727539E-5 0.00013995170593262
Output for 5.6.14
4.0054321289062E-5 4.7922134399414E-5 9.1075897216797E-5
Output for 5.6.13
4.3869018554688E-5 4.6014785766602E-5 9.4890594482422E-5
Output for 5.6.12
6.5088272094727E-5 7.9154968261719E-5 0.00014400482177734
Output for 5.6.11
9.2029571533203E-5 9.0122222900391E-5 0.00014996528625488
Output for 5.6.10
6.103515625E-5 5.1975250244141E-5 0.00010800361633301
Output for 5.6.9
4.5061111450195E-5 5.8889389038086E-5 0.00010108947753906
Output for 5.6.8
4.0054321289062E-5 4.1961669921875E-5 8.5830688476562E-5
Output for 5.6.7
4.2200088500977E-5 4.2915344238281E-5 8.8930130004883E-5
Output for 5.5.35
6.103515625E-5 6.5088272094727E-5 0.00013399124145508
Output for 5.5.34
5.6028366088867E-5 6.9856643676758E-5 0.00013017654418945
Output for 5.5.33
4.1961669921875E-5 5.5074691772461E-5 9.4890594482422E-5
Output for 5.5.32
6.1988830566406E-5 7.7009201049805E-5 0.00013899803161621
Output for 5.5.31
5.1975250244141E-5 5.4836273193359E-5 0.00011396408081055
Output for 5.5.30
5.6982040405273E-5 7.9870223999023E-5 0.00019502639770508
Output for 5.5.29
5.1975250244141E-5 5.5074691772461E-5 0.00011515617370605
Output for 5.5.28
4.0054321289062E-5 4.1007995605469E-5 8.702278137207E-5
Output for 5.5.27
5.4121017456055E-5 6.6995620727539E-5 0.00011682510375977
Output for 5.5.26
6.4849853515625E-5 7.7009201049805E-5 0.0001530647277832
Output for 5.5.25
6.4849853515625E-5 6.7949295043945E-5 0.00014877319335938
Output for 5.5.24
6.103515625E-5 6.8902969360352E-5 0.00018715858459473
Output for 5.4.45
6.0081481933594E-5 8.702278137207E-5 0.00019001960754395
Output for 5.4.44
6.0081481933594E-5 8.6069107055664E-5 0.00017499923706055
Output for 5.4.43
8.392333984375E-5 9.2029571533203E-5 0.00014305114746094
Output for 5.4.42
6.0081481933594E-5 9.7036361694336E-5 0.00018906593322754
Output for 5.4.41
6.1988830566406E-5 6.1988830566406E-5 0.0001380443572998
Output for 5.4.40
0.00010108947753906 0.00014519691467285 0.00027990341186523
Output for 5.4.39
9.2983245849609E-5 8.7976455688477E-5 0.0002129077911377
Output for 5.4.38
9.6797943115234E-5 0.00015401840209961 0.00033307075500488
Output for 5.4.37
6.0081481933594E-5 8.1062316894531E-5 0.00018405914306641
Output for 5.4.36
6.1988830566406E-5 5.9843063354492E-5 0.0001380443572998
Output for 5.4.35
9.918212890625E-5 9.918212890625E-5 0.00023293495178223
Output for 5.4.34
9.7036361694336E-5 8.0108642578125E-5 0.00016093254089355
Output for 5.4.32
4.5061111450195E-5 5.1021575927734E-5 0.00012803077697754
Output for 5.4.31
7.319450378418E-5 9.7036361694336E-5 0.00033283233642578
Output for 5.4.30
4.3869018554688E-5 5.3167343139648E-5 9.8943710327148E-5
Output for 5.4.29
4.4107437133789E-5 7.4148178100586E-5 0.00012803077697754
Output for 5.4.28
7.5101852416992E-5 9.7990036010742E-5 0.00021696090698242
Output for 5.4.27
8.1062316894531E-5 7.7009201049805E-5 0.00019097328186035
Output for 5.4.26
8.082389831543E-5 0.00010085105895996 0.00024199485778809
Output for 5.4.25
4.6014785766602E-5 4.4107437133789E-5 0.00012397766113281
Output for 5.4.24
4.6014785766602E-5 4.5061111450195E-5 0.00013399124145508
Output for 5.4.23
8.4161758422852E-5 7.8916549682617E-5 0.00018715858459473
Output for 5.4.22
7.9870223999023E-5 8.0108642578125E-5 0.00018501281738281
Output for 5.4.21
4.4822692871094E-5 4.5061111450195E-5 0.00015115737915039
Output for 5.4.20
4.6014785766602E-5 5.5074691772461E-5 0.00014400482177734
Output for 5.4.19
4.5061111450195E-5 9.918212890625E-5 0.00019001960754395
Output for 5.4.18
4.4822692871094E-5 8.5830688476562E-5 0.00012493133544922
Output for 5.4.17
4.5061111450195E-5 7.5817108154297E-5 0.00012707710266113
Output for 5.4.16
7.2002410888672E-5 5.6028366088867E-5 0.0001368522644043
Output for 5.4.15
7.7962875366211E-5 7.2002410888672E-5 0.00017094612121582
Output for 5.4.14
7.6055526733398E-5 9.608268737793E-5 0.00024199485778809
Output for 5.4.13
8.702278137207E-5 0.00010514259338379 0.0004279613494873
Output for 5.4.12
0.00010108947753906 7.2956085205078E-5 0.00019288063049316
Output for 5.4.11
7.5101852416992E-5 6.8902969360352E-5 0.00016283988952637
Output for 5.4.10
4.7922134399414E-5 4.3869018554688E-5 0.00013089179992676
Output for 5.4.9
6.7949295043945E-5 0.00013589859008789 0.00018405914306641
Output for 5.4.8
7.3909759521484E-5 7.6055526733398E-5 0.00018000602722168
Output for 5.4.7
8.2015991210938E-5 7.6055526733398E-5 0.00022387504577637
Output for 5.4.6
8.6069107055664E-5 8.0108642578125E-5 0.00019192695617676
Output for 5.4.5
4.6014785766602E-5 4.3869018554688E-5 0.00010299682617188
Output for 5.4.4
7.2002410888672E-5 6.7949295043945E-5 0.00019502639770508
Output for 5.4.3
5.793571472168E-5 5.1975250244141E-5 0.00011706352233887
Output for 5.4.2
8.4877014160156E-5 8.1062316894531E-5 0.00021696090698242
Output for 5.4.1
4.5061111450195E-5 6.2942504882812E-5 0.00017094612121582
Output for 5.4.0
5.0067901611328E-5 5.6028366088867E-5 0.00014591217041016
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/PMr22 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/PMr22 on line 46
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/PMr22 on line 46
Process exited with code 255.