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); } function TestEmpty4() { $array = null; $i = 0; /* The Test */ $t = microtime(true); while($i < 2000) { (gettype($array) === "array"); ++$i; } echo (microtime(true) - $t); } function TestEmpty5() { $array = null; $i = 0; /* The Test */ $t = microtime(true); while($i < 2000) { is_array($array); ++$i; } echo (microtime(true) - $t); } TestEmpty(); echo "\n\n"; TestEmpty2(); echo "\n\n"; TestEmpty3(); echo "\n\n"; TestEmpty4(); echo "\n\n"; TestEmpty5();
Output for 7.1.0
5.0067901611328E-5 2.6941299438477E-5 6.6995620727539E-5 0.00018119812011719 4.6014785766602E-5
Output for 7.0.14
4.6968460083008E-5 2.3841857910156E-5 6.8902969360352E-5 0.00019001960754395 4.2915344238281E-5
Output for 7.0.11
3.6001205444336E-5 2.0980834960938E-5 5.1021575927734E-5 0.00014495849609375 3.3855438232422E-5
Output for 7.0.10
4.3153762817383E-5 2.288818359375E-5 6.6995620727539E-5 0.00017905235290527 3.9100646972656E-5
Output for 7.0.9
4.1961669921875E-5 3.0994415283203E-5 6.5803527832031E-5 0.0001521110534668 4.1961669921875E-5
Output for 7.0.8
4.2915344238281E-5 2.4080276489258E-5 6.3896179199219E-5 0.00015902519226074 3.6954879760742E-5
Output for 7.0.7
4.1007995605469E-5 2.288818359375E-5 5.6982040405273E-5 0.0001521110534668 3.504753112793E-5
Output for 7.0.6
4.887580871582E-5 2.3126602172852E-5 5.0067901611328E-5 0.00014090538024902 3.4093856811523E-5
Output for 7.0.5
5.2213668823242E-5 3.1948089599609E-5 6.1988830566406E-5 0.00016403198242188 3.7908554077148E-5
Output for 7.0.4
5.1021575927734E-5 4.1007995605469E-5 6.8902969360352E-5 0.0001671314239502 4.1007995605469E-5
Output for 7.0.3
5.5074691772461E-5 3.3855438232422E-5 6.1988830566406E-5 0.00016593933105469 4.3153762817383E-5
Output for 7.0.2
5.1021575927734E-5 3.1948089599609E-5 5.6028366088867E-5 0.00015401840209961 4.1961669921875E-5
Output for 7.0.1
4.0054321289062E-5 2.6941299438477E-5 4.2915344238281E-5 0.00011897087097168 3.0040740966797E-5
Output for 7.0.0
5.4121017456055E-5 3.4093856811523E-5 6.9856643676758E-5 0.00016117095947266 4.1961669921875E-5
Output for hhvm-3.13.2
0.00012516975402832 0.00011086463928223 0.00014591217041016 0.00023579597473145 0.00010800361633301
Output for hhvm-3.12.0
0.00013089179992676 0.00011396408081055 0.00014996528625488 0.00024199485778809 0.00011515617370605
Output for hhvm-3.10.0
0.00016999244689941 0.00022506713867188 0.00031900405883789 0.00036787986755371 0.0001828670501709
Output for 5.6.28
8.9168548583984E-5 7.1048736572266E-5 0.00016212463378906 0.00031185150146484 0.00022411346435547
Output for 5.6.26
7.319450378418E-5 6.8902969360352E-5 0.00012493133544922 0.00026202201843262 0.0001838207244873
Output for 5.6.25
7.7009201049805E-5 6.1988830566406E-5 0.00012683868408203 0.00025200843811035 0.00017309188842773
Output for 5.6.24
8.6069107055664E-5 8.2969665527344E-5 0.00016999244689941 0.00029182434082031 0.00020194053649902
Output for 5.6.23
7.7009201049805E-5 6.413459777832E-5 0.00012803077697754 0.00024580955505371 0.00018310546875
Output for 5.6.22
7.5101852416992E-5 6.0796737670898E-5 0.00014901161193848 0.0002439022064209 0.00016593933105469
Output for 5.6.21
6.8902969360352E-5 6.3180923461914E-5 0.00012302398681641 0.0002448558807373 0.00016999244689941
Output for 5.6.20
9.0122222900391E-5 7.1048736572266E-5 0.00014495849609375 0.0002901554107666 0.00020194053649902
Output for 5.6.19
8.7976455688477E-5 7.1048736572266E-5 0.00014710426330566 0.00028491020202637 0.00020313262939453
Output for 5.6.18
9.2983245849609E-5 6.8902969360352E-5 0.00014591217041016 0.0002739429473877 0.00020003318786621
Output for 5.6.17
9.2029571533203E-5 7.3909759521484E-5 0.00015902519226074 0.00033402442932129 0.00021100044250488
Output for 5.6.16
9.2029571533203E-5 7.4863433837891E-5 0.0001678466796875 0.00030183792114258 0.00020694732666016
Output for 5.6.15
8.702278137207E-5 7.1048736572266E-5 0.00014805793762207 0.0003058910369873 0.0001988410949707
Output for 5.6.14
7.2002410888672E-5 4.7922134399414E-5 9.7036361694336E-5 0.00019121170043945 0.00013494491577148
Output for 5.6.13
9.7036361694336E-5 8.5115432739258E-5 0.00014185905456543 0.0002751350402832 0.00020885467529297
Output for 5.6.12
6.1988830566406E-5 6.1988830566406E-5 0.00010800361633301 0.00021004676818848 0.00015687942504883
Output for 5.6.11
7.7962875366211E-5 6.1988830566406E-5 0.00012803077697754 0.00025296211242676 0.00017714500427246
Output for 5.6.10
5.9843063354492E-5 5.1975250244141E-5 0.00011897087097168 0.00027012825012207 0.00012397766113281
Output for 5.6.9
9.0122222900391E-5 7.0810317993164E-5 0.00014710426330566 0.00028705596923828 0.00019598007202148
Output for 5.6.8
8.2969665527344E-5 6.7949295043945E-5 0.00013899803161621 0.00026702880859375 0.00019407272338867
Output for 5.6.7
6.103515625E-5 4.887580871582E-5 0.00012302398681641 0.00020694732666016 0.00014901161193848
Output for 5.6.6
8.4877014160156E-5 6.7949295043945E-5 0.00013899803161621 0.00026202201843262 0.00018692016601562
Output for 5.6.5
8.7976455688477E-5 7.1048736572266E-5 0.00014591217041016 0.00027799606323242 0.00020289421081543
Output for 5.6.4
7.7009201049805E-5 7.2956085205078E-5 0.00013399124145508 0.00024700164794922 0.00019121170043945
Output for 5.6.3
7.7009201049805E-5 6.5088272094727E-5 0.00012803077697754 0.00026512145996094 0.00017189979553223
Output for 5.6.2
8.702278137207E-5 7.1048736572266E-5 0.00014710426330566 0.00027704238891602 0.00019693374633789
Output for 5.6.1
8.1062316894531E-5 6.5088272094727E-5 0.00013399124145508 0.00025296211242676 0.00018000602722168
Output for 5.6.0
0.00012397766113281 5.9127807617188E-5 0.0001220703125 0.00023603439331055 0.00016617774963379
Output for 5.5.38
9.1791152954102E-5 7.4148178100586E-5 0.00015497207641602 0.0003199577331543 0.00021600723266602
Output for 5.5.37
7.4148178100586E-5 5.8889389038086E-5 0.0001220703125 0.00025606155395508 0.00017309188842773
Output for 5.5.36
8.4161758422852E-5 6.6995620727539E-5 0.00014114379882812 0.00029492378234863 0.00020098686218262
Output for 5.5.35
5.6982040405273E-5 4.57763671875E-5 9.5129013061523E-5 0.00019502639770508 0.00013303756713867
Output for 5.5.34
7.5817108154297E-5 6.2942504882812E-5 0.00013089179992676 0.00025200843811035 0.00018000602722168
Output for 5.5.33
7.2956085205078E-5 4.4107437133789E-5 0.00013899803161621 0.00035500526428223 0.00025486946105957
Output for 5.5.32
8.6069107055664E-5 8.8930130004883E-5 0.00015091896057129 0.00029110908508301 0.00022792816162109
Output for 5.5.31
8.4877014160156E-5 7.1048736572266E-5 0.00014710426330566 0.00030899047851562 0.00020694732666016
Output for 5.5.30
9.0837478637695E-5 8.6069107055664E-5 0.00016903877258301 0.00034809112548828 0.00023794174194336
Output for 5.5.29
8.6069107055664E-5 7.9870223999023E-5 0.00015997886657715 0.00033092498779297 0.00022506713867188
Output for 5.5.28
8.5830688476562E-5 8.2969665527344E-5 0.00015997886657715 0.00031495094299316 0.00022006034851074
Output for 5.5.27
8.3208084106445E-5 6.6995620727539E-5 0.00014019012451172 0.00028514862060547 0.00019598007202148
Output for 5.5.26
8.7976455688477E-5 7.3909759521484E-5 0.00015091896057129 0.00029206275939941 0.00020909309387207
Output for 5.5.25
8.702278137207E-5 7.1048736572266E-5 0.00014686584472656 0.00028586387634277 0.00020098686218262
Output for 5.5.24
6.3180923461914E-5 7.5101852416992E-5 0.0001680850982666 0.00034689903259277 0.00022315979003906
Output for 5.5.23
7.2956085205078E-5 5.9843063354492E-5 0.00012493133544922 0.00024914741516113 0.00018095970153809
Output for 5.5.22
8.2015991210938E-5 6.6995620727539E-5 0.00013899803161621 0.00027799606323242 0.0001988410949707
Output for 5.5.21
7.4148178100586E-5 5.9843063354492E-5 0.00012707710266113 0.00024604797363281 0.00017213821411133
Output for 5.5.20
8.702278137207E-5 7.1048736572266E-5 0.00014615058898926 0.00028681755065918 0.00020813941955566
Output for 5.5.19
7.5101852416992E-5 6.1988830566406E-5 0.00012707710266113 0.00025701522827148 0.00018191337585449
Output for 5.5.18
8.702278137207E-5 7.1048736572266E-5 0.00014591217041016 0.00029611587524414 0.00020790100097656
Output for 5.5.16
9.1075897216797E-5 7.6055526733398E-5 0.00015497207641602 0.00030398368835449 0.00021195411682129
Output for 5.5.15
7.8916549682617E-5 6.3896179199219E-5 0.00013494491577148 0.00026893615722656 0.00019598007202148
Output for 5.5.14
8.9168548583984E-5 7.1048736572266E-5 0.00014805793762207 0.00029301643371582 0.00020790100097656
Output for 5.5.13
7.0095062255859E-5 5.5074691772461E-5 0.00011301040649414 0.00023293495178223 0.00016498565673828
Output for 5.5.12
7.5817108154297E-5 6.1988830566406E-5 0.00012898445129395 0.00025796890258789 0.00018095970153809
Output for 5.5.11
8.7976455688477E-5 7.5101852416992E-5 0.00014686584472656 0.00029802322387695 0.00020694732666016
Output for 5.5.10
7.2002410888672E-5 5.9127807617188E-5 0.00012493133544922 0.00024700164794922 0.00018310546875
Output for 5.5.9
8.2015991210938E-5 6.6995620727539E-5 0.00013995170593262 0.00026607513427734 0.00019598007202148
Output for 5.5.8
7.319450378418E-5 5.9127807617188E-5 0.00012397766113281 0.00024008750915527 0.00017118453979492
Output for 5.5.7
8.2969665527344E-5 7.8916549682617E-5 0.00014400482177734 0.00028586387634277 0.00022315979003906
Output for 5.5.6
7.7962875366211E-5 7.2956085205078E-5 0.00014615058898926 0.00029397010803223 0.00018787384033203
Output for 5.5.5
8.6069107055664E-5 7.8916549682617E-5 0.00015902519226074 0.00032496452331543 0.00021004676818848
Output for 5.5.4
8.702278137207E-5 7.1048736572266E-5 0.00014805793762207 0.00028705596923828 0.00021696090698242
Output for 5.5.3
8.702278137207E-5 7.2956085205078E-5 0.00014805793762207 0.00029993057250977 0.00022411346435547
Output for 5.5.2
7.5101852416992E-5 6.1988830566406E-5 0.00012707710266113 0.00025701522827148 0.00018596649169922
Output for 5.5.1
7.9870223999023E-5 6.3896179199219E-5 0.00013303756713867 0.00025606155395508 0.0001978874206543
Output for 5.5.0
8.7976455688477E-5 8.4877014160156E-5 0.00015091896057129 0.00029802322387695 0.00022602081298828
Output for 5.4.45
8.392333984375E-5 7.2002410888672E-5 0.00014591217041016 0.00030899047851562 0.00020813941955566
Output for 5.4.44
5.6028366088867E-5 4.6968460083008E-5 9.7990036010742E-5 0.00020098686218262 0.00013899803161621
Output for 5.4.43
8.1062316894531E-5 6.6995620727539E-5 0.00012493133544922 0.00026202201843262 0.00019693374633789
Output for 5.4.42
8.6069107055664E-5 8.392333984375E-5 0.00015592575073242 0.0003058910369873 0.00022006034851074
Output for 5.4.41
6.6995620727539E-5 6.7949295043945E-5 0.00012588500976562 0.00025701522827148 0.0001828670501709
Output for 5.4.40
8.1062316894531E-5 7.6055526733398E-5 0.0001380443572998 0.00026798248291016 0.00019407272338867
Output for 5.4.39
5.6028366088867E-5 4.7922134399414E-5 9.4890594482422E-5 0.0001981258392334 0.00014090538024902
Output for 5.4.38
8.7976455688477E-5 7.5101852416992E-5 0.00014996528625488 0.00030207633972168 0.00022196769714355
Output for 5.4.37
7.9870223999023E-5 6.6995620727539E-5 0.00014090538024902 0.00028514862060547 0.00020408630371094
Output for 5.4.36
5.5074691772461E-5 4.9829483032227E-5 9.1075897216797E-5 0.00018692016601562 0.00013518333435059
Output for 5.4.35
6.1988830566406E-5 5.2928924560547E-5 0.00010895729064941 0.0002138614654541 0.00015807151794434
Output for 5.4.34
7.2002410888672E-5 5.8889389038086E-5 0.00011801719665527 0.00024294853210449 0.00018191337585449
Output for 5.4.32
7.6055526733398E-5 6.5088272094727E-5 0.00012898445129395 0.00026202201843262 0.00019121170043945
Output for 5.4.31
9.9897384643555E-5 9.0122222900391E-5 0.00016307830810547 0.00028896331787109 0.00023007392883301
Output for 5.4.30
8.7976455688477E-5 7.5101852416992E-5 0.00014996528625488 0.00030112266540527 0.00022220611572266
Output for 5.4.29
7.7009201049805E-5 6.5088272094727E-5 0.00014805793762207 0.00027990341186523 0.00018906593322754
Output for 5.4.28
7.3909759521484E-5 6.1988830566406E-5 0.00012397766113281 0.00025200843811035 0.00018596649169922
Output for 5.4.27
8.4161758422852E-5 7.2002410888672E-5 0.00014305114746094 0.00029206275939941 0.0002138614654541
Output for 5.4.26
8.9168548583984E-5 7.3909759521484E-5 0.00016307830810547 0.00030899047851562 0.0002288818359375
Output for 5.4.25
8.8930130004883E-5 7.3909759521484E-5 0.00014901161193848 0.00029802322387695 0.00022077560424805
Output for 5.4.24
9.2029571533203E-5 7.7009201049805E-5 0.00016188621520996 0.00030899047851562 0.00022578239440918
Output for 5.4.23
7.9154968261719E-5 6.7949295043945E-5 0.00013494491577148 0.00026798248291016 0.0001978874206543
Output for 5.4.22
6.2227249145508E-5 5.0067901611328E-5 0.00010204315185547 0.00020194053649902 0.00014400482177734
Output for 5.4.21
8.392333984375E-5 8.1062316894531E-5 0.00014996528625488 0.00031113624572754 0.00024890899658203
Output for 5.4.20
8.5830688476562E-5 7.9154968261719E-5 0.00015902519226074 0.00030708312988281 0.00022387504577637
Output for 5.4.19
8.4877014160156E-5 8.1062316894531E-5 0.00014591217041016 0.00028800964355469 0.00023317337036133
Output for 5.4.18
8.0108642578125E-5 6.6995620727539E-5 0.00015497207641602 0.00028109550476074 0.00020718574523926
Output for 5.4.17
8.2969665527344E-5 7.1048736572266E-5 0.00014281272888184 0.00029516220092773 0.00020718574523926
Output for 5.4.16
8.1062316894531E-5 6.6995620727539E-5 0.00013494491577148 0.00028014183044434 0.00020599365234375
Output for 5.4.15
8.6069107055664E-5 7.1048736572266E-5 0.00014305114746094 0.00028395652770996 0.00020909309387207
Output for 5.4.14
8.7976455688477E-5 7.6055526733398E-5 0.00017213821411133 0.00031518936157227 0.00021815299987793
Output for 5.4.13
8.2015991210938E-5 7.0810317993164E-5 0.00014090538024902 0.00029206275939941 0.00020718574523926
Output for 5.4.12
7.2002410888672E-5 6.1988830566406E-5 0.00012302398681641 0.0002589225769043 0.00018596649169922
Output for 5.4.11
8.5115432739258E-5 7.2002410888672E-5 0.00014305114746094 0.00029492378234863 0.0002129077911377
Output for 5.4.10
8.8930130004883E-5 9.4890594482422E-5 0.00015497207641602 0.00031518936157227 0.00023984909057617
Output for 5.4.9
8.5830688476562E-5 4.3153762817383E-5 0.00010013580322266 0.00027990341186523 0.00013589859008789
Output for 5.4.8
8.4161758422852E-5 7.1048736572266E-5 0.00014185905456543 0.00029802322387695 0.00020694732666016
Output for 5.4.7
8.392333984375E-5 7.0810317993164E-5 0.00014090538024902 0.0002899169921875 0.00020909309387207
Output for 5.4.6
8.7976455688477E-5 7.3909759521484E-5 0.0001530647277832 0.00039410591125488 0.00022411346435547
Output for 5.4.5
0.0001060962677002 7.4863433837891E-5 0.0001521110534668 0.00031495094299316 0.00022006034851074
Output for 5.4.4
5.5074691772461E-5 5.2928924560547E-5 9.2983245849609E-5 0.00019001960754395 0.00013494491577148
Output for 5.4.3
8.7976455688477E-5 7.6055526733398E-5 0.00014901161193848 0.00030207633972168 0.00024580955505371
Output for 5.4.2
8.2015991210938E-5 9.2983245849609E-5 0.00013208389282227 0.00026798248291016 0.00020885467529297
Output for 5.4.1
8.2015991210938E-5 6.7949295043945E-5 0.00015902519226074 0.00027203559875488 0.00020194053649902
Output for 5.4.0
7.7009201049805E-5 6.6995620727539E-5 0.0001518726348877 0.00024509429931641 0.00013017654418945
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/eLWcK 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/eLWcK on line 46
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/eLWcK on line 46
Process exited with code 255.