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
5.793571472168E-5 3.6954879760742E-5 7.2002410888672E-5
Output for 7.0.14
4.57763671875E-5 2.5033950805664E-5 6.1988830566406E-5
Output for 7.0.6
4.7922134399414E-5 2.8133392333984E-5 6.0081481933594E-5
Output for 7.0.5
3.6001205444336E-5 2.5033950805664E-5 4.4107437133789E-5
Output for 7.0.4
4.7206878662109E-5 3.0994415283203E-5 5.3882598876953E-5
Output for 7.0.3
4.5061111450195E-5 2.598762512207E-5 4.5061111450195E-5
Output for 7.0.2
3.8862228393555E-5 2.6941299438477E-5 4.6968460083008E-5
Output for 7.0.1
4.7922134399414E-5 3.2186508178711E-5 5.9127807617188E-5
Output for 7.0.0
3.0994415283203E-5 1.9073486328125E-5 3.6954879760742E-5
Output for hhvm-3.12.0
0.00011301040649414 9.5129013061523E-5 0.0001680850982666
Output for hhvm-3.10.0
0.00012302398681641 0.00012111663818359 0.00014591217041016
Output for 5.6.28
8.8930130004883E-5 7.2002410888672E-5 0.00016307830810547
Output for 5.6.21
6.413459777832E-5 6.6041946411133E-5 0.00011396408081055
Output for 5.6.20
8.2015991210938E-5 6.6995620727539E-5 0.00013995170593262
Output for 5.6.19
6.8902969360352E-5 5.793571472168E-5 0.00011682510375977
Output for 5.6.18
5.1975250244141E-5 4.2915344238281E-5 8.8930130004883E-5
Output for 5.6.17
7.6055526733398E-5 6.1988830566406E-5 0.00012803077697754
Output for 5.6.16
8.0108642578125E-5 6.3896179199219E-5 0.00013303756713867
Output for 5.6.15
6.6995620727539E-5 5.4121017456055E-5 0.00011587142944336
Output for 5.6.14
8.8214874267578E-5 8.2015991210938E-5 0.0001530647277832
Output for 5.6.13
8.392333984375E-5 6.8187713623047E-5 0.00014090538024902
Output for 5.6.12
5.1021575927734E-5 5.0067901611328E-5 9.0122222900391E-5
Output for 5.6.11
5.4121017456055E-5 4.5061111450195E-5 9.2983245849609E-5
Output for 5.6.10
7.2956085205078E-5 6.9856643676758E-5 0.00012612342834473
Output for 5.6.9
8.6069107055664E-5 8.392333984375E-5 0.0001518726348877
Output for 5.6.8
5.1021575927734E-5 4.1007995605469E-5 8.6069107055664E-5
Output for 5.5.35
6.6041946411133E-5 5.3882598876953E-5 0.00011301040649414
Output for 5.5.34
9.2983245849609E-5 7.8201293945312E-5 0.00015711784362793
Output for 5.5.33
8.2015991210938E-5 8.6069107055664E-5 0.00014495849609375
Output for 5.5.32
7.6055526733398E-5 6.103515625E-5 0.00013089179992676
Output for 5.5.31
5.0067901611328E-5 4.1961669921875E-5 8.8214874267578E-5
Output for 5.5.30
7.2002410888672E-5 6.8902969360352E-5 0.0001218318939209
Output for 5.5.29
5.2928924560547E-5 4.3869018554688E-5 9.0122222900391E-5
Output for 5.5.28
7.2002410888672E-5 5.8889389038086E-5 0.0001220703125
Output for 5.5.27
9.7036361694336E-5 6.9856643676758E-5 0.00016903877258301
Output for 5.5.26
7.7962875366211E-5 7.7009201049805E-5 0.0001378059387207
Output for 5.5.25
5.1975250244141E-5 5.0067901611328E-5 9.7990036010742E-5
Output for 5.5.24
9.5844268798828E-5 5.6982040405273E-5 0.00013995170593262
Output for 5.4.45
5.1021575927734E-5 4.2915344238281E-5 0.00010299682617188
Output for 5.4.44
5.1975250244141E-5 5.5074691772461E-5 0.00010585784912109
Output for 5.4.43
5.0783157348633E-5 4.2915344238281E-5 0.00010299682617188
Output for 5.4.42
5.1021575927734E-5 5.5074691772461E-5 0.00011086463928223
Output for 5.4.41
5.1975250244141E-5 4.4107437133789E-5 0.00010299682617188
Output for 5.4.40
5.1021575927734E-5 5.6982040405273E-5 0.00010418891906738
Output for 5.4.3, 5.4.39
5.1021575927734E-5 4.3153762817383E-5 9.9897384643555E-5
Output for 5.4.38
5.1021575927734E-5 5.4836273193359E-5 0.00010108947753906
Output for 5.4.37
5.1975250244141E-5 4.3153762817383E-5 9.918212890625E-5
Output for 5.4.36
5.1975250244141E-5 4.2915344238281E-5 9.8943710327148E-5
Output for 5.4.35
8.5115432739258E-5 7.0095062255859E-5 0.00017595291137695
Output for 5.4.34
5.0067901611328E-5 6.3896179199219E-5 0.00014710426330566
Output for 5.4.32
7.7962875366211E-5 6.8187713623047E-5 0.00015687942504883
Output for 5.4.31
7.3909759521484E-5 6.3180923461914E-5 0.00015997886657715
Output for 5.4.30
5.1975250244141E-5 4.5061111450195E-5 9.8943710327148E-5
Output for 5.4.29
5.1975250244141E-5 4.4107437133789E-5 0.00010013580322266
Output for 5.4.28
5.3882598876953E-5 4.3869018554688E-5 0.00010013580322266
Output for 5.4.27
4.9829483032227E-5 4.1007995605469E-5 9.7036361694336E-5
Output for 5.4.26
7.2956085205078E-5 5.1021575927734E-5 0.00013589859008789
Output for 5.4.25
5.1021575927734E-5 4.2200088500977E-5 9.608268737793E-5
Output for 5.4.24
4.9829483032227E-5 4.1961669921875E-5 0.00014901161193848
Output for 5.4.23
5.1975250244141E-5 4.1961669921875E-5 9.608268737793E-5
Output for 5.4.22
5.8889389038086E-5 4.887580871582E-5 0.00011301040649414
Output for 5.4.21
7.9154968261719E-5 6.6041946411133E-5 0.00011706352233887
Output for 5.4.20
5.1021575927734E-5 4.7922134399414E-5 0.00018620491027832
Output for 5.4.19
6.9141387939453E-5 6.7949295043945E-5 0.00019288063049316
Output for 5.4.18
5.1975250244141E-5 4.8160552978516E-5 0.00010013580322266
Output for 5.4.17
5.1021575927734E-5 4.1007995605469E-5 9.7990036010742E-5
Output for 5.4.16
5.1975250244141E-5 4.8160552978516E-5 9.918212890625E-5
Output for 5.4.15
5.4836273193359E-5 4.1961669921875E-5 9.608268737793E-5
Output for 5.4.14
5.1975250244141E-5 5.1975250244141E-5 0.0001060962677002
Output for 5.4.13
8.392333984375E-5 6.3896179199219E-5 0.00016093254089355
Output for 5.4.12
8.2969665527344E-5 4.7922134399414E-5 0.0001060962677002
Output for 5.4.11
5.5074691772461E-5 4.2915344238281E-5 0.00010800361633301
Output for 5.4.10
5.1975250244141E-5 5.1975250244141E-5 0.00010299682617188
Output for 5.4.9
5.1021575927734E-5 4.2915344238281E-5 9.7990036010742E-5
Output for 5.4.8
5.2928924560547E-5 4.3153762817383E-5 9.7990036010742E-5
Output for 5.4.7
5.1021575927734E-5 4.1961669921875E-5 9.5129013061523E-5
Output for 5.4.6
5.1021575927734E-5 4.2200088500977E-5 9.7036361694336E-5
Output for 5.4.5
5.1021575927734E-5 6.2942504882812E-5 0.00010204315185547
Output for 5.4.4
5.1021575927734E-5 4.3153762817383E-5 9.0837478637695E-5
Output for 5.4.2
5.1975250244141E-5 4.3153762817383E-5 9.7990036010742E-5
Output for 5.4.1
5.2213668823242E-5 4.3869018554688E-5 9.7990036010742E-5
Output for 5.4.0
7.4148178100586E-5 7.0095062255859E-5 0.00016212463378906
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/VGCZM 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/VGCZM on line 46
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/VGCZM on line 46
Process exited with code 255.