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
3.9100646972656E-5 7.0095062255859E-5 8.5830688476562E-5
Output for 7.0.14
4.9114227294922E-5 8.2015991210938E-5 7.1048736572266E-5
Output for 7.0.6
4.5061111450195E-5 6.103515625E-5 5.6982040405273E-5
Output for 7.0.5
3.8862228393555E-5 5.2928924560547E-5 5.1021575927734E-5
Output for 7.0.4
2.9802322387695E-5 7.4148178100586E-5 6.3896179199219E-5
Output for 7.0.3
2.6941299438477E-5 4.1007995605469E-5 3.9100646972656E-5
Output for 7.0.2
2.598762512207E-5 4.4107437133789E-5 3.6001205444336E-5
Output for 7.0.1
3.2901763916016E-5 4.6968460083008E-5 4.1961669921875E-5
Output for 7.0.0
4.1961669921875E-5 7.4863433837891E-5 6.2942504882812E-5
Output for 5.6.28
7.5817108154297E-5 0.00019097328186035 0.00016999244689941
Output for 5.6.21
6.5088272094727E-5 0.00016498565673828 0.00013899803161621
Output for 5.6.20
5.1021575927734E-5 0.00011396408081055 0.00010800361633301
Output for 5.6.19
5.793571472168E-5 9.7990036010742E-5 0.00011515617370605
Output for 5.6.18
4.9114227294922E-5 0.00011086463928223 0.00010514259338379
Output for 5.6.17
5.9843063354492E-5 0.00015115737915039 0.00013089179992676
Output for 5.6.16
6.7949295043945E-5 0.00017499923706055 0.00014400482177734
Output for 5.6.15
6.6041946411133E-5 0.00014781951904297 0.0001380443572998
Output for 5.6.14
6.0081481933594E-5 0.00013399124145508 0.00013089179992676
Output for 5.6.13
4.7922134399414E-5 0.00010800361633301 0.00011396408081055
Output for 5.6.12
4.9829483032227E-5 0.00011491775512695 0.00010490417480469
Output for 5.6.11
6.413459777832E-5 0.00022101402282715 0.0001671314239502
Output for 5.6.10
7.7962875366211E-5 0.00015401840209961 0.0001521110534668
Output for 5.6.9
8.392333984375E-5 0.00015091896057129 0.00013303756713867
Output for 5.6.8
0.00010514259338379 0.00018000602722168 0.00019407272338867
Output for 5.6.7
4.9829483032227E-5 0.00011706352233887 0.00010919570922852
Output for 5.5.35
6.0081481933594E-5 0.00013399124145508 0.00014400482177734
Output for 5.5.34
4.3153762817383E-5 9.7990036010742E-5 9.1791152954102E-5
Output for 5.5.33
7.0095062255859E-5 0.00015401840209961 0.00014400482177734
Output for 5.5.32
4.6968460083008E-5 0.00010395050048828 9.8943710327148E-5
Output for 5.5.31
5.2928924560547E-5 0.00012707710266113 0.00011205673217773
Output for 5.5.30
5.5074691772461E-5 0.00012397766113281 0.00011610984802246
Output for 5.5.29
4.4107437133789E-5 9.7036361694336E-5 9.1075897216797E-5
Output for 5.5.28
5.6028366088867E-5 0.00014710426330566 0.0001218318939209
Output for 5.5.27
5.793571472168E-5 0.00013303756713867 0.00012516975402832
Output for 5.5.26
6.7949295043945E-5 0.00015783309936523 0.00014495849609375
Output for 5.5.25
6.8902969360352E-5 0.00015401840209961 0.00014400482177734
Output for 5.5.24
3.6001205444336E-5 8.1062316894531E-5 7.6055526733398E-5
Output for 5.4.45
6.3896179199219E-5 0.00018405914306641 0.00013279914855957
Output for 5.4.44
6.413459777832E-5 0.00013995170593262 0.00019478797912598
Output for 5.4.43
9.3221664428711E-5 0.00037813186645508 0.00030803680419922
Output for 5.4.42
0.0001068115234375 0.0003509521484375 0.00030517578125
Output for 5.4.41
6.5088272094727E-5 0.00014185905456543 0.00013208389282227
Output for 5.4.40
6.5803527832031E-5 0.00013995170593262 0.00013113021850586
Output for 5.4.39
6.2942504882812E-5 0.00014185905456543 0.00012993812561035
Output for 5.4.38
0.00011897087097168 0.00026702880859375 0.00024008750915527
Output for 5.4.37
6.6041946411133E-5 0.00013995170593262 0.00017094612121582
Output for 5.4.36
6.2942504882812E-5 0.00019598007202148 0.0001671314239502
Output for 5.4.35
9.7036361694336E-5 0.00018811225891113 0.00019502639770508
Output for 5.4.34
6.413459777832E-5 0.0001981258392334 0.00017189979553223
Output for 5.4.32
4.6014785766602E-5 0.00011610984802246 0.00013995170593262
Output for 5.4.31
5.9843063354492E-5 0.00011706352233887 0.00013589859008789
Output for 5.4.30
4.4107437133789E-5 0.00011515617370605 0.00014090538024902
Output for 5.4.29
9.9897384643555E-5 0.00034117698669434 0.00024795532226562
Output for 5.4.28
4.7922134399414E-5 0.00012302398681641 0.0001370906829834
Output for 5.4.27
5.4121017456055E-5 0.00011801719665527 0.00015616416931152
Output for 5.4.26
4.7922134399414E-5 0.00025200843811035 0.00013995170593262
Output for 5.4.25
8.5830688476562E-5 0.00023102760314941 0.00017809867858887
Output for 5.4.24
7.8916549682617E-5 0.00025296211242676 0.00018000602722168
Output for 5.4.23
8.4877014160156E-5 0.00024795532226562 0.0002739429473877
Output for 5.4.22
9.608268737793E-5 0.00030398368835449 0.00024580955505371
Output for 5.4.21
7.7009201049805E-5 0.00017404556274414 0.00017499923706055
Output for 5.4.20
8.5830688476562E-5 0.000244140625 0.0002598762512207
Output for 5.4.19
6.2942504882812E-5 0.00011014938354492 0.0001070499420166
Output for 5.4.18
7.1048736572266E-5 0.0001978874206543 0.00018906593322754
Output for 5.4.17
6.103515625E-5 0.00013303756713867 0.00014400482177734
Output for 5.4.16
7.7009201049805E-5 0.00019097328186035 0.00018095970153809
Output for 5.4.15
7.319450378418E-5 0.00029397010803223 0.00034189224243164
Output for 5.4.14
7.7009201049805E-5 0.00021195411682129 0.00026798248291016
Output for 5.4.13
7.8916549682617E-5 0.00019407272338867 0.00026082992553711
Output for 5.4.12
8.2015991210938E-5 0.0002589225769043 0.00034308433532715
Output for 5.4.11
7.0095062255859E-5 0.00011086463928223 0.00025177001953125
Output for 5.4.10
4.6968460083008E-5 0.00015497207641602 0.00013613700866699
Output for 5.4.9
6.5088272094727E-5 0.0002589225769043 0.00015997886657715
Output for 5.4.8
4.8160552978516E-5 0.00022196769714355 0.00013399124145508
Output for 5.4.7
4.7922134399414E-5 0.00056695938110352 0.00011086463928223
Output for 5.4.6
4.7206878662109E-5 0.00014185905456543 0.00013399124145508
Output for 5.4.5
6.2942504882812E-5 0.00022697448730469 0.00017786026000977
Output for 5.4.4
5.2928924560547E-5 0.00019216537475586 0.00015807151794434
Output for 5.4.3
4.6968460083008E-5 0.00013518333435059 0.00025296211242676
Output for 5.4.2
7.9154968261719E-5 0.00021982192993164 0.00028085708618164
Output for 5.4.1
4.6968460083008E-5 0.00013113021850586 0.00012898445129395
Output for 5.4.0
7.7962875366211E-5 0.00021696090698242 0.00016307830810547
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/5HEmv on line 30
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/5HEmv on line 30
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/5HEmv on line 30
Process exited with code 255.