3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $times = 1000*100*10; $var = null; $var = 10; $var2 = '10'; $time1 = microtime(true); for ($i = 0; $i <= $times; $i++) { if ($var == $var2) {} } $time1 = microtime(true) - $time1; echo "Time using '!': $time1\n"; $time2 = microtime(true); for ($i = 0; $i <= $times; $i++) { if ($var === $var2) {} } $time2 = microtime(true) - $time2; echo "Time using '===': $time2\n"; if ($time1 > $time2){ $p = (($time1-$time2)/$time2) * 100; //printf("'===' was faster by %.2f percent.", $p); printf("'===' was faster"); } else { $p = (($time2-$time1)/$time1) * 100; //printf("'==' was faster by %.2f percent.", $p); printf("'==' was faster"); }
Output for 7.1.0
Time using '!': 0.055072069168091 Time using '===': 0.028817176818848 '===' was faster
Output for 7.0.14
Time using '!': 0.051501989364624 Time using '===': 0.014738082885742 '===' was faster
Output for 7.0.6
Time using '!': 0.031664848327637 Time using '===': 0.010426044464111 '===' was faster
Output for 7.0.5
Time using '!': 0.042335987091064 Time using '===': 0.013386964797974 '===' was faster
Output for 7.0.4
Time using '!': 0.030879020690918 Time using '===': 0.01007604598999 '===' was faster
Output for 7.0.3
Time using '!': 0.038069009780884 Time using '===': 0.011853933334351 '===' was faster
Output for 7.0.2
Time using '!': 0.039261102676392 Time using '===': 0.012033939361572 '===' was faster
Output for 7.0.1
Time using '!': 0.042095899581909 Time using '===': 0.012892007827759 '===' was faster
Output for 7.0.0
Time using '!': 0.040271997451782 Time using '===': 0.013022184371948 '===' was faster
Output for hhvm-3.12.0
Time using '!': 0.09911584854126 Time using '===': 0.060482025146484 '===' was faster
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.28
Time using '!': 0.088829040527344 Time using '===': 0.034946203231812 '===' was faster
Output for 5.6.21
Time using '!': 0.068329811096191 Time using '===': 0.02984619140625 '===' was faster
Output for 5.6.20
Time using '!': 0.057312965393066 Time using '===': 0.029397964477539 '===' was faster
Output for 5.6.19
Time using '!': 0.063762903213501 Time using '===': 0.029417991638184 '===' was faster
Output for 5.6.18
Time using '!': 0.071799993515015 Time using '===': 0.030549049377441 '===' was faster
Output for 5.6.17
Time using '!': 0.072399139404297 Time using '===': 0.031075954437256 '===' was faster
Output for 5.6.16
Time using '!': 0.0572190284729 Time using '===': 0.029248952865601 '===' was faster
Output for 5.6.15
Time using '!': 0.080636024475098 Time using '===': 0.033730030059814 '===' was faster
Output for 5.6.14
Time using '!': 0.05656886100769 Time using '===': 0.029342174530029 '===' was faster
Output for 5.6.13
Time using '!': 0.0780930519104 Time using '===': 0.033744812011719 '===' was faster
Output for 5.6.12
Time using '!': 0.075446128845215 Time using '===': 0.031378984451294 '===' was faster
Output for 5.6.11
Time using '!': 0.056866884231567 Time using '===': 0.029287099838257 '===' was faster
Output for 5.6.10
Time using '!': 0.076457977294922 Time using '===': 0.033679008483887 '===' was faster
Output for 5.6.9
Time using '!': 0.068549156188965 Time using '===': 0.030715942382812 '===' was faster
Output for 5.6.8
Time using '!': 0.066236019134521 Time using '===': 0.029576063156128 '===' was faster
Output for 5.5.35
Time using '!': 0.061227083206177 Time using '===': 0.030539035797119 '===' was faster
Output for 5.5.34
Time using '!': 0.068071842193604 Time using '===': 0.029809951782227 '===' was faster
Output for 5.5.33
Time using '!': 0.054008960723877 Time using '===': 0.028625011444092 '===' was faster
Output for 5.5.32
Time using '!': 0.060053825378418 Time using '===': 0.030248165130615 '===' was faster
Output for 5.5.31
Time using '!': 0.058931112289429 Time using '===': 0.029493808746338 '===' was faster
Output for 5.5.30
Time using '!': 0.058067083358765 Time using '===': 0.031603813171387 '===' was faster
Output for 5.5.29
Time using '!': 0.080398082733154 Time using '===': 0.032969951629639 '===' was faster
Output for 5.5.28
Time using '!': 0.073375940322876 Time using '===': 0.029618978500366 '===' was faster
Output for 5.5.27
Time using '!': 0.069138050079346 Time using '===': 0.03095817565918 '===' was faster
Output for 5.5.26
Time using '!': 0.067259073257446 Time using '===': 0.029752016067505 '===' was faster
Output for 5.5.25
Time using '!': 0.057001113891602 Time using '===': 0.029537916183472 '===' was faster
Output for 5.5.24
Time using '!': 0.071721076965332 Time using '===': 0.0313880443573 '===' was faster
Output for 5.4.45
Time using '!': 0.061040878295898 Time using '===': 0.029237985610962 '===' was faster
Output for 5.4.44
Time using '!': 0.078618049621582 Time using '===': 0.03708815574646 '===' was faster
Output for 5.4.43
Time using '!': 0.082319974899292 Time using '===': 0.034151792526245 '===' was faster
Output for 5.4.42
Time using '!': 0.070469856262207 Time using '===': 0.029355049133301 '===' was faster
Output for 5.4.41
Time using '!': 0.073227167129517 Time using '===': 0.031324148178101 '===' was faster
Output for 5.4.40
Time using '!': 0.058404922485352 Time using '===': 0.029776096343994 '===' was faster
Output for 5.4.39
Time using '!': 0.071918964385986 Time using '===': 0.03082799911499 '===' was faster
Output for 5.4.38
Time using '!': 0.062394142150879 Time using '===': 0.029450178146362 '===' was faster
Output for 5.4.37
Time using '!': 0.068898916244507 Time using '===': 0.032679080963135 '===' was faster
Output for 5.4.36
Time using '!': 0.062891960144043 Time using '===': 0.029218912124634 '===' was faster
Output for 5.4.35
Time using '!': 0.061270952224731 Time using '===': 0.029323816299438 '===' was faster
Output for 5.4.34
Time using '!': 0.073508024215698 Time using '===': 0.033024072647095 '===' was faster
Output for 5.4.32
Time using '!': 0.056079149246216 Time using '===': 0.029106140136719 '===' was faster
Output for 5.4.31
Time using '!': 0.05659818649292 Time using '===': 0.029067993164062 '===' was faster
Output for 5.4.30
Time using '!': 0.056047201156616 Time using '===': 0.029170036315918 '===' was faster
Output for 5.4.29
Time using '!': 0.064651012420654 Time using '===': 0.029547929763794 '===' was faster
Output for 5.4.28
Time using '!': 0.075173139572144 Time using '===': 0.042253017425537 '===' was faster
Output for 5.4.27
Time using '!': 0.053852081298828 Time using '===': 0.033957004547119 '===' was faster
Output for 5.4.26
Time using '!': 0.063055038452148 Time using '===': 0.029484033584595 '===' was faster
Output for 5.4.25
Time using '!': 0.058793067932129 Time using '===': 0.031300067901611 '===' was faster
Output for 5.4.24
Time using '!': 0.070456027984619 Time using '===': 0.033807992935181 '===' was faster
Output for 5.4.23
Time using '!': 0.067724943161011 Time using '===': 0.029729127883911 '===' was faster
Output for 5.4.22
Time using '!': 0.060016870498657 Time using '===': 0.028911113739014 '===' was faster
Output for 5.4.21
Time using '!': 0.061069965362549 Time using '===': 0.029859066009521 '===' was faster
Output for 5.4.20
Time using '!': 0.069844007492065 Time using '===': 0.029687166213989 '===' was faster
Output for 5.4.19
Time using '!': 0.058841943740845 Time using '===': 0.033434152603149 '===' was faster
Output for 5.4.18
Time using '!': 0.057597875595093 Time using '===': 0.029384136199951 '===' was faster
Output for 5.4.17
Time using '!': 0.054280042648315 Time using '===': 0.029294967651367 '===' was faster
Output for 5.4.16
Time using '!': 0.055068969726562 Time using '===': 0.029315948486328 '===' was faster
Output for 5.4.15
Time using '!': 0.055892944335938 Time using '===': 0.02931809425354 '===' was faster
Output for 5.4.14
Time using '!': 0.066482067108154 Time using '===': 0.0296790599823 '===' was faster
Output for 5.4.13
Time using '!': 0.070719957351685 Time using '===': 0.030987024307251 '===' was faster
Output for 5.4.12
Time using '!': 0.079205989837646 Time using '===': 0.033512115478516 '===' was faster
Output for 5.4.11
Time using '!': 0.054972171783447 Time using '===': 0.030675888061523 '===' was faster
Output for 5.4.10
Time using '!': 0.072453022003174 Time using '===': 0.030792951583862 '===' was faster
Output for 5.4.9
Time using '!': 0.056794881820679 Time using '===': 0.029781818389893 '===' was faster
Output for 5.4.8
Time using '!': 0.069582939147949 Time using '===': 0.029592037200928 '===' was faster
Output for 5.4.7
Time using '!': 0.054687023162842 Time using '===': 0.029497861862183 '===' was faster
Output for 5.4.6
Time using '!': 0.063591003417969 Time using '===': 0.029316186904907 '===' was faster
Output for 5.4.5
Time using '!': 0.063214063644409 Time using '===': 0.029628038406372 '===' was faster
Output for 5.4.4
Time using '!': 0.071180820465088 Time using '===': 0.029504060745239 '===' was faster
Output for 5.4.3
Time using '!': 0.076026916503906 Time using '===': 0.029237031936646 '===' was faster
Output for 5.4.2
Time using '!': 0.068730115890503 Time using '===': 0.031197786331177 '===' was faster
Output for 5.4.1
Time using '!': 0.054124116897583 Time using '===': 0.029566049575806 '===' was faster
Output for 5.4.0
Time using '!': 0.064085960388184 Time using '===': 0.029127836227417 '===' was faster
Output for 5.3.29
Time using '!': 0.065448999404907 Time using '===': 0.034575223922729 '===' was faster
Output for 5.3.28
Time using '!': 0.075099945068359 Time using '===': 0.042311906814575 '===' was faster
Output for 5.3.27
Time using '!': 0.067389011383057 Time using '===': 0.036653995513916 '===' was faster
Output for 5.3.26
Time using '!': 0.080869913101196 Time using '===': 0.039702892303467 '===' was faster
Output for 5.3.25
Time using '!': 0.064700126647949 Time using '===': 0.038532972335815 '===' was faster
Output for 5.3.24
Time using '!': 0.078968048095703 Time using '===': 0.040016889572144 '===' was faster
Output for 5.3.23
Time using '!': 0.09421706199646 Time using '===': 0.048756837844849 '===' was faster
Output for 5.3.22
Time using '!': 0.066527843475342 Time using '===': 0.040657043457031 '===' was faster
Output for 5.3.21
Time using '!': 0.079480886459351 Time using '===': 0.040742874145508 '===' was faster
Output for 5.3.20
Time using '!': 0.066466093063354 Time using '===': 0.041393995285034 '===' was faster
Output for 5.3.19
Time using '!': 0.096725225448608 Time using '===': 0.048929929733276 '===' was faster
Output for 5.3.18
Time using '!': 0.074173927307129 Time using '===': 0.040493965148926 '===' was faster
Output for 5.3.17
Time using '!': 0.07685399055481 Time using '===': 0.039029121398926 '===' was faster
Output for 5.3.16
Time using '!': 0.07019305229187 Time using '===': 0.038460969924927 '===' was faster
Output for 5.3.15
Time using '!': 0.084836959838867 Time using '===': 0.040411949157715 '===' was faster
Output for 5.3.14
Time using '!': 0.077714920043945 Time using '===': 0.037926197052002 '===' was faster
Output for 5.3.13
Time using '!': 0.073700189590454 Time using '===': 0.043041944503784 '===' was faster
Output for 5.3.12
Time using '!': 0.07828688621521 Time using '===': 0.038676977157593 '===' was faster
Output for 5.3.11
Time using '!': 0.074512004852295 Time using '===': 0.038454055786133 '===' was faster
Output for 5.3.10
Time using '!': 0.063175201416016 Time using '===': 0.037036895751953 '===' was faster
Output for 5.3.9
Time using '!': 0.070629835128784 Time using '===': 0.038090944290161 '===' was faster
Output for 5.3.8
Time using '!': 0.082510948181152 Time using '===': 0.0399329662323 '===' was faster
Output for 5.3.7
Time using '!': 0.06314492225647 Time using '===': 0.037676811218262 '===' was faster
Output for 5.3.6
Time using '!': 0.073980808258057 Time using '===': 0.041605949401855 '===' was faster
Output for 5.3.5
Time using '!': 0.061814069747925 Time using '===': 0.03759503364563 '===' was faster
Output for 5.3.4
Time using '!': 0.06388521194458 Time using '===': 0.039566993713379 '===' was faster
Output for 5.3.3
Time using '!': 0.080299139022827 Time using '===': 0.042043924331665 '===' was faster
Output for 5.3.2
Time using '!': 0.0608229637146 Time using '===': 0.038670778274536 '===' was faster
Output for 5.3.1
Time using '!': 0.081284046173096 Time using '===': 0.04209303855896 '===' was faster
Output for 5.3.0
Time using '!': 0.08260703086853 Time using '===': 0.040472984313965 '===' was faster
Output for 5.2.17
Time using '!': 0.093439102172852 Time using '===': 0.051618814468384 '===' was faster
Output for 5.2.16
Time using '!': 0.10599899291992 Time using '===': 0.052016019821167 '===' was faster
Output for 5.2.15
Time using '!': 0.084046840667725 Time using '===': 0.054003953933716 '===' was faster
Output for 5.2.14
Time using '!': 0.084450960159302 Time using '===': 0.051393032073975 '===' was faster
Output for 5.2.13
Time using '!': 0.10343384742737 Time using '===': 0.056027889251709 '===' was faster
Output for 5.2.12
Time using '!': 0.1002790927887 Time using '===': 0.055046796798706 '===' was faster
Output for 5.2.11
Time using '!': 0.11141896247864 Time using '===': 0.051867008209229 '===' was faster
Output for 5.2.10
Time using '!': 0.086201906204224 Time using '===': 0.059505939483643 '===' was faster
Output for 5.2.9
Time using '!': 0.10528492927551 Time using '===': 0.052058935165405 '===' was faster
Output for 5.2.8
Time using '!': 0.11144399642944 Time using '===': 0.052433013916016 '===' was faster
Output for 5.2.7
Time using '!': 0.10929489135742 Time using '===': 0.053318023681641 '===' was faster
Output for 5.2.6
Time using '!': 0.098701953887939 Time using '===': 0.052150011062622 '===' was faster
Output for 5.2.5
Time using '!': 0.082697868347168 Time using '===': 0.051475048065186 '===' was faster
Output for 5.2.4
Time using '!': 0.085936069488525 Time using '===': 0.055835008621216 '===' was faster
Output for 5.2.3
Time using '!': 0.082391023635864 Time using '===': 0.051548957824707 '===' was faster
Output for 5.2.2
Time using '!': 0.082331895828247 Time using '===': 0.052428007125854 '===' was faster
Output for 5.2.1
Time using '!': 0.091325044631958 Time using '===': 0.045658111572266 '===' was faster
Output for 5.2.0
Time using '!': 0.098820924758911 Time using '===': 0.053876161575317 '===' was faster
Output for 5.1.6
Time using '!': 0.087868928909302 Time using '===': 0.052228927612305 '===' was faster
Output for 5.1.5
Time using '!': 0.10828113555908 Time using '===': 0.056583166122437 '===' was faster
Output for 5.1.4
Time using '!': 0.081367015838623 Time using '===': 0.051622152328491 '===' was faster
Output for 5.1.3
Time using '!': 0.082663059234619 Time using '===': 0.052984952926636 '===' was faster
Output for 5.1.2
Time using '!': 0.083369016647339 Time using '===': 0.051191091537476 '===' was faster
Output for 5.1.1
Time using '!': 0.079162120819092 Time using '===': 0.051259994506836 '===' was faster
Output for 5.1.0
Time using '!': 0.082194089889526 Time using '===': 0.051697969436646 '===' was faster
Output for 5.0.5
Time using '!': 0.18828105926514 Time using '===': 0.15497994422913 '===' was faster
Output for 5.0.4
Time using '!': 0.22141981124878 Time using '===': 0.15345406532288 '===' was faster
Output for 5.0.3
Time using '!': 0.19684195518494 Time using '===': 0.14996290206909 '===' was faster
Output for 5.0.2
Time using '!': 0.29032301902771 Time using '===': 0.22084712982178 '===' was faster
Output for 5.0.1
Time using '!': 0.1787109375 Time using '===': 0.14404201507568 '===' was faster
Output for 5.0.0
Time using '!': 0.18378305435181 Time using '===': 0.15201687812805 '===' was faster
Output for 4.4.9
Time using '!': 0.221624 Time using '===': 0.148217 '===' was faster
Output for 4.4.8
Time using '!': -0.779463 Time using '===': 0.148665 '==' was faster
Output for 4.4.7
Time using '!': 0.216973 Time using '===': 0.149153 '===' was faster
Output for 4.4.6
Time using '!': -0.81331 Time using '===': 0.151331 '==' was faster
Output for 4.4.5
Time using '!': 0.185807 Time using '===': 0.153855 '===' was faster
Output for 4.4.4
Time using '!': -0.754642 Time using '===': 0.176323 '==' was faster
Output for 4.4.3
Time using '!': 0.205693 Time using '===': -0.850464 '===' was faster
Output for 4.4.2
Time using '!': 0.183446 Time using '===': 0.158838 '===' was faster
Output for 4.4.1
Time using '!': 0.18634 Time using '===': 0.151588 '===' was faster
Output for 4.4.0
Time using '!': -0.710751 Time using '===': 0.229935 '==' was faster
Output for 4.3.11
Time using '!': 0.174932 Time using '===': 0.144045 '===' was faster
Output for 4.3.10
Time using '!': -0.826132 Time using '===': 0.142132 '==' was faster
Output for 4.3.9
Time using '!': 0.175951 Time using '===': 0.141036 '===' was faster
Output for 4.3.8
Time using '!': 0.188642 Time using '===': 0.152209 '===' was faster
Output for 4.3.7
Time using '!': -0.80727 Time using '===': 0.145273 '==' was faster
Output for 4.3.6
Time using '!': 0.215106 Time using '===': 0.153294 '===' was faster
Output for 4.3.5
Time using '!': -0.730023 Time using '===': 0.215571 '==' was faster
Output for 4.3.4
Time using '!': 0.209836 Time using '===': 0.166645 '===' was faster
Output for 4.3.3
Time using '!': -0.816172 Time using '===': 0.146682 '==' was faster
Output for 4.3.2
Time using '!': 0.235315 Time using '===': 0.175417 '===' was faster
Output for 4.3.1
Time using '!': -0.789598 Time using '===': 0.14376 '==' was faster
Output for 4.3.0
Time using '!': 0.182159 Time using '===': 0.146553 '===' was faster