3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function test1() { $str = 'derp'; if ($str != 'files' && $str != 'something' && $str != 'Derrr') { return; } return; } function test2() { $str = 'derp'; switch ($str) { case 'files': case 'something': case 'Derrr': break; default: return; } return; } $start = microtime(1); for ($i = 1; $i < 10000; $i++) { test1(); } echo "test1: ".($start - microtime(1)); $start = microtime(1); for ($i = 1; $i < 10000; $i++) { test2(); } echo "\ntest2: ".$start - microtime(1);
Output for 7.1.0
test1: -0.0012331008911133 Warning: A non-numeric value encountered in /in/ZeIAd on line 39 -1356651897.0085
Output for 7.0.14
test1: -0.0013501644134521-1356651897.0062
Output for 7.0.8
test1: -0.00068998336791992-1356651897.005
Output for 7.0.7
test1: -0.00065803527832031-1356651897.0046
Output for 7.0.6
test1: -0.00064206123352051-1356651897.0046
Output for 7.0.5
test1: -0.00051784515380859-1356651897.0037
Output for 7.0.4
test1: -0.00066995620727539-1356651897.0047
Output for 7.0.3
test1: -0.00051593780517578-1356651897.0037
Output for 7.0.2
test1: -0.00084710121154785-1356651897.0059
Output for 7.0.1
test1: -0.00070714950561523-1356651897.0048
Output for 7.0.0
test1: -0.00081515312194824-1356651897.0057
Output for hhvm-3.12.0
test1: -0.0022408962249756-1356651897.16
Output for hhvm-3.10.0
test1: -0.0021438598632812-1356651897.1559
Output for 5.6.28
test1: -0.0034749507904053-1356651897.0113
Output for 5.6.23
test1: -0.0021591186523438-1356651897.0088
Output for 5.6.22
test1: -0.0023400783538818-1356651897.0094
Output for 5.6.21
test1: -0.0026819705963135-1356651897.0102
Output for 5.6.20
test1: -0.002626895904541-1356651897.01
Output for 5.6.14, 5.6.19
test1: -0.0030159950256348-1356651897.0115
Output for 5.6.18
test1: -0.0019700527191162-1356651897.0076
Output for 5.6.17
test1: -0.0019488334655762-1356651897.0075
Output for 5.6.16
test1: -0.0020449161529541-1356651897.0078
Output for 5.6.15
test1: -0.002312183380127-1356651897.0092
Output for 5.6.13
test1: -0.0030920505523682-1356651897.0114
Output for 5.6.12
test1: -0.0025699138641357-1356651897.0091
Output for 5.6.11
test1: -0.0030431747436523-1356651897.0111
Output for 5.6.10
test1: -0.0025279521942139-1356651897.0095
Output for 5.6.9
test1: -0.0025460720062256-1356651897.0096
Output for 5.6.8
test1: -0.0022690296173096-1356651897.0087
Output for 5.6.7
test1: -0.002892017364502-1356651897.0108
Output for 5.6.6
test1: -0.0026998519897461-1356651897.0101
Output for 5.6.5
test1: -0.0029628276824951-1356651897.0116
Output for 5.6.4
test1: -0.0022039413452148-1356651897.0084
Output for 5.6.3
test1: -0.0029888153076172-1356651897.0116
Output for 5.6.2
test1: -0.0020878314971924-1356651897.0079
Output for 5.6.1
test1: -0.0022239685058594-1356651897.0084
Output for 5.6.0
test1: -0.0018110275268555-1356651897.007
Output for 5.5.37
test1: -0.0030498504638672-1356651897.0122
Output for 5.5.36
test1: -0.0018148422241211-1356651897.0074
Output for 5.5.35
test1: -0.0026190280914307-1356651897.0091
Output for 5.5.34
test1: -0.0029969215393066-1356651897.0112
Output for 5.5.33
test1: -0.002863883972168-1356651897.0109
Output for 5.5.32
test1: -0.0024549961090088-1356651897.0092
Output for 5.5.31
test1: -0.0025019645690918-1356651897.0097
Output for 5.5.30
test1: -0.0025520324707031-1356651897.0099
Output for 5.5.29
test1: -0.002593994140625-1356651897.0101
Output for 5.5.28
test1: -0.0017960071563721-1356651897.0068
Output for 5.5.27
test1: -0.0030219554901123-1356651897.0111
Output for 5.5.26
test1: -0.0028538703918457-1356651897.0107
Output for 5.5.25
test1: -0.0028300285339355-1356651897.0105
Output for 5.5.24
test1: -0.0025789737701416-1356651897.0099
Output for 5.5.23
test1: -0.0022568702697754-1356651897.0089
Output for 5.5.22
test1: -0.0023989677429199-1356651897.0098
Output for 5.5.21
test1: -0.0025980472564697-1356651897.0099
Output for 5.5.20
test1: -0.002593994140625-1356651897.0102
Output for 5.5.19
test1: -0.0029239654541016-1356651897.0114
Output for 5.5.18
test1: -0.0029361248016357-1356651897.0111
Output for 5.5.16
test1: -0.0020239353179932-1356651897.0078
Output for 5.5.15
test1: -0.0029020309448242-1356651897.0111
Output for 5.5.14
test1: -0.0028040409088135-1356651897.0108
Output for 5.5.13
test1: -0.0032329559326172-1356651897.0128
Output for 5.5.12
test1: -0.0026218891143799-1356651897.0104
Output for 5.5.11
test1: -0.0034420490264893-1356651897.012
Output for 5.5.10
test1: -0.0031309127807617-1356651897.0116
Output for 5.5.9
test1: -0.0028021335601807-1356651897.0108
Output for 5.5.8
test1: -0.0025801658630371-1356651897.01
Output for 5.5.7
test1: -0.0028789043426514-1356651897.0111
Output for 5.5.6
test1: -0.0025608539581299-1356651897.0097
Output for 5.5.5
test1: -0.003075122833252-1356651897.012
Output for 5.5.4
test1: -0.0029480457305908-1356651897.0112
Output for 5.5.3
test1: -0.002885103225708-1356651897.0114
Output for 5.5.2
test1: -0.0025479793548584-1356651897.0101
Output for 5.5.1
test1: -0.0026760101318359-1356651897.0105
Output for 5.5.0
test1: -0.0028011798858643-1356651897.0114
Output for 5.4.45
test1: -0.0024309158325195-1356651897.0091
Output for 5.4.44
test1: -0.0021810531616211-1356651897.0085
Output for 5.4.43
test1: -0.002838134765625-1356651897.0106
Output for 5.4.42
test1: -0.0034899711608887-1356651897.0122
Output for 5.4.41
test1: -0.0026800632476807-1356651897.0099
Output for 5.4.40
test1: -0.0024740695953369-1356651897.0092
Output for 5.4.39
test1: -0.0029599666595459-1356651897.0118
Output for 5.4.38
test1: -0.0036759376525879-1356651897.0112
Output for 5.4.37
test1: -0.002410888671875-1356651897.0095
Output for 5.4.36
test1: -0.0027589797973633-1356651897.0104
Output for 5.4.35
test1: -0.0027701854705811-1356651897.0104
Output for 5.4.34
test1: -0.0025069713592529-1356651897.0094
Output for 5.4.32
test1: -0.0027129650115967-1356651897.0095
Output for 5.4.31
test1: -0.0017490386962891-1356651897.0073
Output for 5.4.30
test1: -0.0026230812072754-1356651897.0095
Output for 5.4.29
test1: -0.0025279521942139-1356651897.0096
Output for 5.4.28
test1: -0.0027451515197754-1356651897.0104
Output for 5.4.27
test1: -0.0022709369659424-1356651897.0093
Output for 5.4.26
test1: -0.0026340484619141-1356651897.0088
Output for 5.4.25
test1: -0.0029420852661133-1356651897.0109
Output for 5.4.24
test1: -0.0029618740081787-1356651897.011
Output for 5.4.23
test1: -0.0032479763031006-1356651897.0112
Output for 5.4.22
test1: -0.0029458999633789-1356651897.0108
Output for 5.4.21
test1: -0.0028190612792969-1356651897.0107
Output for 5.4.20
test1: -0.0027508735656738-1356651897.0103
Output for 5.4.19
test1: -0.0030360221862793-1356651897.0107
Output for 5.4.18
test1: -0.0029270648956299-1356651897.0103
Output for 5.4.17
test1: -0.0029129981994629-1356651897.0106
Output for 5.4.16
test1: -0.0027189254760742-1356651897.0101
Output for 5.4.15
test1: -0.0019121170043945-1356651897.0071
Output for 5.4.14
test1: -0.0029418468475342-1356651897.0091
Output for 5.4.13
test1: -0.0017030239105225-1356651897.0053
Output for 5.4.12
test1: -0.0028979778289795-1356651897.0089
Output for 5.4.11
test1: -0.001910924911499-1356651897.0062
Output for 5.4.10
test1: -0.0016820430755615-1356651897.0053
Output for 5.4.9
test1: -0.001896858215332-1356651897.0059
Output for 5.4.8
test1: -0.00205397605896-1356651897.0058
Output for 5.4.7
test1: -0.0016651153564453-1356651897.0052
Output for 5.4.6
test1: -0.0016801357269287-1356651897.0053
Output for 5.4.5
test1: -0.0017070770263672-1356651897.0055
Output for 5.4.4
test1: -0.0016908645629883-1356651897.0056
Output for 5.4.3
test1: -0.0017139911651611-1356651897.0052
Output for 5.4.2
test1: -0.0029618740081787-1356651897.0089
Output for 5.4.1
test1: -0.0026898384094238-1356651897.0081
Output for 5.4.0
test1: -0.0030591487884521-1356651897.0088
Output for 5.3.29
test1: -0.0041341781616211-1356651897.0104
Output for 5.3.28
test1: -0.0036959648132324-1356651897.0095
Output for 5.3.27
test1: -0.004202127456665-1356651897.0108
Output for 5.3.26
test1: -0.0041129589080811-1356651897.0104
Output for 5.3.25
test1: -0.0030858516693115-1356651897.0077
Output for 5.3.24
test1: -0.0043671131134033-1356651897.0112
Output for 5.3.23
test1: -0.004565954208374-1356651897.0116
Output for 5.3.22
test1: -0.0047929286956787-1356651897.0115
Output for 5.3.21
test1: -0.0036571025848389-1356651897.0095
Output for 5.3.20
test1: -0.0027360916137695-1356651897.0069
Output for 5.3.19
test1: -0.0034990310668945-1356651897.0088
Output for 5.3.18
test1: -0.0030908584594727-1356651897.0076
Output for 5.3.17
test1: -0.0029749870300293-1356651897.0073
Output for 5.3.16
test1: -0.0025730133056641-1356651897.0064
Output for 5.3.15
test1: -0.0028700828552246-1356651897.0071
Output for 5.3.14
test1: -0.0026481151580811-1356651897.0067
Output for 5.3.13
test1: -0.0026600360870361-1356651897.0067
Output for 5.3.12
test1: -0.0025978088378906-1356651897.0064
Output for 5.3.11
test1: -0.0043189525604248-1356651897.0107
Output for 5.3.10
test1: -0.0044400691986084-1356651897.0108
Output for 5.3.9
test1: -0.0040099620819092-1356651897.0098
Output for 5.3.8
test1: -0.0038418769836426-1356651897.0096
Output for 5.3.7
test1: -0.0030791759490967-1356651897.008
Output for 5.3.6
test1: -0.0039060115814209-1356651897.0096
Output for 5.3.5
test1: -0.0026638507843018-1356651897.0071
Output for 5.3.4
test1: -0.0025608539581299-1356651897.0065
Output for 5.3.3
test1: -0.0028009414672852-1356651897.007
Output for 5.3.2
test1: -0.0030860900878906-1356651897.0073
Output for 5.3.1
test1: -0.0027539730072021-1356651897.007
Output for 5.3.0
test1: -0.0025639533996582-1356651897.0064
Output for 5.2.17
test1: -0.0043580532073975-1356651897.0099
Output for 5.2.16
test1: -0.0047299861907959-1356651897.0111
Output for 5.2.15
test1: -0.0041599273681641-1356651897.0091
Output for 5.2.14
test1: -0.0046789646148682-1356651897.0104
Output for 5.2.13
test1: -0.0067529678344727-1356651897.0145
Output for 5.2.12
test1: -0.0045568943023682-1356651897.0099
Output for 5.2.11
test1: -0.0041399002075195-1356651897.009
Output for 5.2.10
test1: -0.0040600299835205-1356651897.0089
Output for 5.2.9
test1: -0.004647970199585-1356651897.01
Output for 5.2.8
test1: -0.0046820640563965-1356651897.0103
Output for 5.2.7
test1: -0.0042212009429932-1356651897.0094
Output for 5.2.6
test1: -0.0041038990020752-1356651897.009
Output for 5.2.5
test1: -0.0041670799255371-1356651897.0092
Output for 5.2.4
test1: -0.0042130947113037-1356651897.0092
Output for 5.2.3
test1: -0.0049238204956055-1356651897.0106
Output for 5.2.2
test1: -0.0041871070861816-1356651897.0091
Output for 5.2.1
test1: -0.0043840408325195-1356651897.0095
Output for 5.2.0
test1: -0.0058498382568359-1356651897.0125
Output for 5.1.6
test1: -0.0044479370117188-1356651897.0098
Output for 5.1.5
test1: -0.0066020488739014-1356651897.0141
Output for 5.1.4
test1: -0.0069990158081055-1356651897.0149
Output for 5.1.3
test1: -0.0076429843902588-1356651897.015
Output for 5.1.2
test1: -0.0060460567474365-1356651897.012
Output for 5.1.1
test1: -0.0052049160003662-1356651897.0111
Output for 5.1.0
test1: -0.0077180862426758-1356651897.0159
Output for 5.0.5
test1: -0.0057969093322754-1356651897.0117
Output for 5.0.4
test1: -0.0058557987213135-1356651897.0116
Output for 5.0.3
test1: -0.0059981346130371-1356651897.0117
Output for 5.0.2
test1: -0.0049538612365723-1356651897.0101
Output for 5.0.1
test1: -0.0055890083312988-1356651897.0112
Output for 5.0.0
test1: -0.0065758228302002-1356651897.0133
Output for 4.4.9
test1: -0.005756-0.011521
Output for 4.4.8
test1: -0.006525-0.012641
Output for 4.4.7
test1: -0.006267-0.012417
Output for 4.4.6
test1: -0.006084-0.011849
Output for 4.4.5
test1: -0.007383-0.013742
Output for 4.4.4
test1: -0.006125-0.011692
Output for 4.4.3
test1: -0.009435-0.017818
Output for 4.4.2
test1: -0.01149-0.021256
Output for 4.4.1
test1: -0.005762-0.01109
Output for 4.4.0
test1: -0.0055-0.011801
Output for 4.3.11
test1: -0.008083-0.015374
Output for 4.3.10
test1: -0.010979-0.020324
Output for 4.3.9
test1: -0.005262-0.010026
Output for 4.3.8
test1: -0.011482-0.020934
Output for 4.3.7
test1: -0.012357-0.022293
Output for 4.3.6
test1: -0.013563-0.023699
Output for 4.3.5
test1: -0.009072-0.017516
Output for 4.3.4
test1: -0.010496-0.020114
Output for 4.3.3
test1: -0.010762-0.019821
Output for 4.3.2
test1: -0.012507-0.023849
Output for 4.3.1
test1: -0.010205-0.019264
Output for 4.3.0
test1: -0.01223-0.023243