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.8862228393555E-5 2.0980834960938E-5 3.3855438232422E-5
Output for 7.0.14
4.6014785766602E-5 2.598762512207E-5 4.0054321289062E-5
Output for 7.0.10
3.9100646972656E-5 2.1934509277344E-5 3.4093856811523E-5
Output for 7.0.9
3.3140182495117E-5 2.7894973754883E-5 3.4093856811523E-5
Output for 7.0.8
4.0054321289062E-5 2.0027160644531E-5 2.7179718017578E-5
Output for 7.0.7
2.6226043701172E-5 1.5020370483398E-5 2.3126602172852E-5
Output for 7.0.6
4.0054321289062E-5 2.3841857910156E-5 3.3855438232422E-5
Output for 7.0.5
3.9100646972656E-5 2.9802322387695E-5 3.1948089599609E-5
Output for 7.0.4
5.4121017456055E-5 3.4093856811523E-5 3.2901763916016E-5
Output for 7.0.3
4.1961669921875E-5 3.0994415283203E-5 3.4093856811523E-5
Output for 7.0.2
3.2901763916016E-5 2.5033950805664E-5 2.9087066650391E-5
Output for 7.0.1
4.0054321289062E-5 3.1948089599609E-5 3.504753112793E-5
Output for 7.0.0
4.1961669921875E-5 3.1948089599609E-5 3.504753112793E-5
Output for 5.6.28
7.0095062255859E-5 7.2002410888672E-5 0.0001380443572998
Output for 5.6.25
6.8902969360352E-5 9.4890594482422E-5 0.00012493133544922
Output for 5.6.24
7.5101852416992E-5 7.6055526733398E-5 0.00012993812561035
Output for 5.6.23
5.9127807617188E-5 7.1048736572266E-5 0.00011014938354492
Output for 5.6.22
6.5088272094727E-5 8.2969665527344E-5 0.00010108947753906
Output for 5.6.21
4.8160552978516E-5 5.1021575927734E-5 8.9168548583984E-5
Output for 5.6.20
6.5088272094727E-5 7.6055526733398E-5 0.00012302398681641
Output for 5.6.19
6.3896179199219E-5 8.6069107055664E-5 0.0001671314239502
Output for 5.6.18
5.9127807617188E-5 6.1988830566406E-5 0.00010991096496582
Output for 5.6.17
6.2942504882812E-5 7.2956085205078E-5 0.00011920928955078
Output for 5.6.16
6.413459777832E-5 7.5817108154297E-5 0.00012683868408203
Output for 5.5.34, 5.6.15
5.6982040405273E-5 5.8889389038086E-5 0.0001060962677002
Output for 5.6.14
5.3882598876953E-5 5.6982040405273E-5 0.00010013580322266
Output for 5.6.13
6.8187713623047E-5 7.1048736572266E-5 0.00012707710266113
Output for 5.6.12
6.2942504882812E-5 7.6055526733398E-5 0.0001378059387207
Output for 5.6.11
6.5088272094727E-5 6.7949295043945E-5 0.0001218318939209
Output for 5.6.10
6.7949295043945E-5 8.2015991210938E-5 0.00012993812561035
Output for 5.6.9
6.6995620727539E-5 7.1048736572266E-5 0.00012612342834473
Output for 5.6.8
4.887580871582E-5 5.2928924560547E-5 9.9897384643555E-5
Output for 5.6.7
5.6982040405273E-5 7.0095062255859E-5 0.00010919570922852
Output for 5.6.6
5.793571472168E-5 6.1988830566406E-5 0.00011086463928223
Output for 5.6.5
4.1007995605469E-5 4.887580871582E-5 7.6055526733398E-5
Output for 5.6.4
4.1961669921875E-5 4.2915344238281E-5 7.6055526733398E-5
Output for 5.6.3
4.5061111450195E-5 5.3882598876953E-5 8.9883804321289E-5
Output for 5.6.2
5.5074691772461E-5 3.6001205444336E-5 6.6995620727539E-5
Output for 5.6.1
7.319450378418E-5 7.7009201049805E-5 0.00014805793762207
Output for 5.6.0
6.5088272094727E-5 7.7962875366211E-5 0.00013208389282227
Output for 5.5.38
5.793571472168E-5 5.9127807617188E-5 0.00010585784912109
Output for 5.5.37
7.3909759521484E-5 7.4148178100586E-5 0.00013399124145508
Output for 5.5.36
5.9843063354492E-5 7.3909759521484E-5 0.00012302398681641
Output for 5.5.35
6.4849853515625E-5 6.7949295043945E-5 0.00013089179992676
Output for 5.5.33
4.7922134399414E-5 5.0783157348633E-5 9.7036361694336E-5
Output for 5.5.32
5.1975250244141E-5 5.5074691772461E-5 9.7990036010742E-5
Output for 5.5.31
6.1988830566406E-5 6.4849853515625E-5 0.00011515617370605
Output for 5.5.30
5.0067901611328E-5 5.1975250244141E-5 9.5129013061523E-5
Output for 5.5.29
6.1988830566406E-5 6.3896179199219E-5 0.00012302398681641
Output for 5.5.28
6.6041946411133E-5 6.9856643676758E-5 0.00012612342834473
Output for 5.5.27
6.4849853515625E-5 7.7009201049805E-5 0.00013303756713867
Output for 5.5.26
4.6968460083008E-5 4.887580871582E-5 8.7976455688477E-5
Output for 5.5.25
5.9127807617188E-5 6.3180923461914E-5 0.00010991096496582
Output for 5.5.24
6.5088272094727E-5 6.8187713623047E-5 0.00012087821960449
Output for 5.5.23
5.8889389038086E-5 7.0810317993164E-5 0.00011992454528809
Output for 5.5.22
4.3869018554688E-5 4.6014785766602E-5 8.9883804321289E-5
Output for 5.5.21
7.319450378418E-5 7.2956085205078E-5 0.00015592575073242
Output for 5.5.20
4.1961669921875E-5 4.2915344238281E-5 7.8916549682617E-5
Output for 5.5.19
5.6028366088867E-5 5.8889389038086E-5 0.00010204315185547
Output for 5.5.18
6.6995620727539E-5 7.2956085205078E-5 0.00013113021850586
Output for 5.5.16
5.6028366088867E-5 5.9127807617188E-5 0.00011396408081055
Output for 5.5.1, 5.5.14 - 5.5.15
4.1007995605469E-5 4.2915344238281E-5 7.7009201049805E-5
Output for 5.5.13
5.1021575927734E-5 5.9843063354492E-5 0.00010204315185547
Output for 5.5.12
4.2915344238281E-5 5.6028366088867E-5 8.702278137207E-5
Output for 5.5.11
3.504753112793E-5 3.6001205444336E-5 6.5088272094727E-5
Output for 5.5.10
5.3882598876953E-5 5.4836273193359E-5 9.7990036010742E-5
Output for 5.5.9
6.413459777832E-5 6.7949295043945E-5 0.0001220703125
Output for 5.5.8
5.9127807617188E-5 6.3180923461914E-5 0.00011110305786133
Output for 5.5.7
6.103515625E-5 6.5088272094727E-5 0.00011610984802246
Output for 5.5.6
5.1021575927734E-5 5.2928924560547E-5 9.3936920166016E-5
Output for 5.5.5
4.3869018554688E-5 4.4822692871094E-5 8.2015991210938E-5
Output for 5.5.4
4.3869018554688E-5 4.6014785766602E-5 8.2015991210938E-5
Output for 5.5.3
6.6995620727539E-5 6.9856643676758E-5 0.00013017654418945
Output for 5.5.2
4.7922134399414E-5 5.1021575927734E-5 9.2029571533203E-5
Output for 5.5.0
6.413459777832E-5 6.6995620727539E-5 0.0001218318939209
Output for 5.4.45
6.2942504882812E-5 6.2942504882812E-5 0.00012898445129395
Output for 5.4.44
4.1007995605469E-5 5.0783157348633E-5 9.7036361694336E-5
Output for 5.4.43
5.1021575927734E-5 7.5817108154297E-5 0.00011682510375977
Output for 5.4.42
5.6982040405273E-5 5.9843063354492E-5 0.00011897087097168
Output for 5.4.41
5.7220458984375E-5 6.0081481933594E-5 0.00011897087097168
Output for 5.4.40
8.7976455688477E-5 9.2029571533203E-5 0.00020217895507812
Output for 5.4.39
7.1048736572266E-5 7.4148178100586E-5 0.0001518726348877
Output for 5.4.38
5.0067901611328E-5 5.2928924560547E-5 0.00010514259338379
Output for 5.4.37
6.1988830566406E-5 5.6028366088867E-5 0.00011396408081055
Output for 5.4.36
4.1961669921875E-5 4.4822692871094E-5 8.702278137207E-5
Output for 5.4.35
4.5061111450195E-5 4.6968460083008E-5 9.3936920166016E-5
Output for 5.4.34
6.103515625E-5 6.5088272094727E-5 0.00012993812561035
Output for 5.4.32
6.1988830566406E-5 6.9141387939453E-5 0.00010013580322266
Output for 5.4.31
5.1975250244141E-5 5.5074691772461E-5 0.00010895729064941
Output for 5.4.30
4.1961669921875E-5 4.2915344238281E-5 8.7976455688477E-5
Output for 5.4.29
4.1961669921875E-5 4.3153762817383E-5 0.00010013580322266
Output for 5.4.28
5.1975250244141E-5 4.1961669921875E-5 8.2969665527344E-5
Output for 5.4.27
6.6995620727539E-5 7.0810317993164E-5 0.00015521049499512
Output for 5.4.26
4.5061111450195E-5 6.3896179199219E-5 0.0001060962677002
Output for 5.4.25
5.0067901611328E-5 5.4121017456055E-5 0.0001060962677002
Output for 5.4.24
5.4121017456055E-5 6.6995620727539E-5 0.00011706352233887
Output for 5.4.23
5.9127807617188E-5 6.1988830566406E-5 0.00014400482177734
Output for 5.4.22
5.0067901611328E-5 5.1975250244141E-5 0.0001070499420166
Output for 5.4.21
4.9114227294922E-5 5.9127807617188E-5 0.00010299682617188
Output for 5.4.20
4.1007995605469E-5 4.6014785766602E-5 0.00010013580322266
Output for 5.4.19
6.4849853515625E-5 7.1048736572266E-5 0.0001368522644043
Output for 5.4.18
4.1961669921875E-5 4.3869018554688E-5 9.7036361694336E-5
Output for 5.4.17
4.9114227294922E-5 5.0783157348633E-5 0.00010299682617188
Output for 5.4.16
5.8889389038086E-5 6.2942504882812E-5 0.00012421607971191
Output for 5.4.15
4.1961669921875E-5 4.2915344238281E-5 8.702278137207E-5
Output for 5.4.14
6.103515625E-5 7.2002410888672E-5 0.00014305114746094
Output for 5.4.13
4.1007995605469E-5 4.3869018554688E-5 8.8930130004883E-5
Output for 5.4.12
5.8889389038086E-5 6.1988830566406E-5 0.00012898445129395
Output for 5.4.11
5.8889389038086E-5 6.2942504882812E-5 0.00012516975402832
Output for 5.4.10
6.413459777832E-5 8.0108642578125E-5 0.00013899803161621
Output for 5.4.9
7.7962875366211E-5 6.6995620727539E-5 0.00014209747314453
Output for 5.4.8
6.103515625E-5 7.6055526733398E-5 0.00013899803161621
Output for 5.4.7
5.6028366088867E-5 5.9843063354492E-5 0.00013399124145508
Output for 5.4.6
8.2969665527344E-5 8.1062316894531E-5 0.00014305114746094
Output for 5.4.5
7.1048736572266E-5 8.7976455688477E-5 0.00015997886657715
Output for 5.4.4
6.413459777832E-5 9.1075897216797E-5 0.00013613700866699
Output for 5.4.3
6.7949295043945E-5 7.1048736572266E-5 0.00014209747314453
Output for 5.4.2
5.9127807617188E-5 6.8902969360352E-5 0.00012803077697754
Output for 5.4.1
7.1048736572266E-5 7.3909759521484E-5 0.00014996528625488
Output for 5.4.0
6.5088272094727E-5 6.8902969360352E-5 0.00013995170593262
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/9YHlA 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/9YHlA on line 46
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/9YHlA on line 46
Process exited with code 255.