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(); for ($i = 1; $i < 10000; $i++) { test1(); } echo "test1: ".$start - microtime(1); $start = microtime(1); for ($i = 1; $i < 10000; $i++) { test2(); } echo "test2: ".$start - microtime();
Output for 7.1.0
Warning: A non-numeric value encountered in /in/L055L on line 31 -1356651865.0072 Warning: A non-numeric value encountered in /in/L055L on line 39 Notice: A non well formed numeric value encountered in /in/L055L on line 39 -0.008109
Output for 7.0.14
-1356651865.0053-0.006232
Output for 7.0.7
-1356655465.0043-0.004822
Output for 7.0.6
-1356655465.0049-0.005496
Output for 7.0.5
-1356655465.0053-0.005963
Output for 7.0.4
-1356655465.0044-0.004993
Output for 7.0.3
-1356655465.0042-0.004704
Output for 7.0.2
-1356655465.0038-0.00425
Output for 7.0.1
-1356655465.0045-0.005173
Output for 7.0.0
-1356655465.0034-0.003862
Output for hhvm-3.12.0
-1356655465.1403-0.142364
Output for hhvm-3.10.0
-1356655465.1009-0.103127
Output for 5.6.28
-1356651865.0081-0.011547
Output for 5.6.22
-1356655465.0073-0.00988
Output for 5.6.21
-1356655465.0053-0.007456
Output for 5.6.20
-1356655465.0084-0.012225
Output for 5.6.19
-1356655465.0066-0.009336
Output for 5.6.18
-1356655465.0074-0.009709
Output for 5.6.17
-1356655465.0098-0.013973
Output for 5.6.16
-1356655465.0085-0.012064
Output for 5.6.15
-1356655465.0066-0.009428
Output for 5.6.14
-1356655465.0055-0.007718
Output for 5.6.13
-1356655465.0071-0.009251
Output for 5.6.12
-1356655465.0082-0.01154
Output for 5.6.11
-1356655465.0072-0.010169
Output for 5.6.10
-1356655465.007-0.009621
Output for 5.6.9
-1356655465.0073-0.010566
Output for 5.6.8
-1356655465.0094-0.012722
Output for 5.6.7
-1356655465.0089-0.012621
Output for 5.6.6
-1356655465.007-0.009558
Output for 5.6.5
-1356655465.0109-0.015454
Output for 5.6.4
-1356655465.0087-0.012547
Output for 5.6.3
-1356655465.0067-0.009424
Output for 5.6.2
-1356655465.0073-0.010276
Output for 5.6.1
-1356655465.0081-0.011528
Output for 5.6.0
-1356655465.0069-0.009697
Output for 5.5.36
-1356655465.0057-0.008107
Output for 5.5.35
-1356655465.0073-0.010184
Output for 5.5.34
-1356655465.0085-0.012109
Output for 5.5.33
-1356655465.0077-0.010784
Output for 5.5.32
-1356655465.007-0.00974
Output for 5.5.31
-1356655465.0078-0.010725
Output for 5.5.30
-1356655465.009-0.012715
Output for 5.5.29
-1356655465.0054-0.007917
Output for 5.5.28
-1356655465.0085-0.012065
Output for 5.5.27
-1356655465.0062-0.008742
Output for 5.5.26
-1356655465.0084-0.011768
Output for 5.5.25
-1356655465.0084-0.012152
Output for 5.5.24
-1356655465.0075-0.010619
Output for 5.5.23
-1356655465.0075-0.010528
Output for 5.5.22
-1356655465.0053-0.007464
Output for 5.5.21
-1356655465.0053-0.007468
Output for 5.5.20
-1356655465.0083-0.011807
Output for 5.5.19
-1356655465.006-0.008454
Output for 5.5.18
-1356655465.009-0.012954
Output for 5.5.16
-1356655465.0091-0.012807
Output for 5.5.15
-1356655465.0064-0.009149
Output for 5.5.14
-1356655465.0092-0.012714
Output for 5.5.13
-1356655465.0092-0.012901
Output for 5.5.12
-1356655465.007-0.009839
Output for 5.5.11
-1356655465.0098-0.013611
Output for 5.5.10
-1356655465.0073-0.010013
Output for 5.5.9
-1356655465.006-0.008303
Output for 5.5.8
-1356655465.0079-0.011228
Output for 5.5.7
-1356655465.0081-0.011489
Output for 5.5.6
-1356655465.009-0.012665
Output for 5.5.5
-1356655465.0061-0.008822
Output for 5.5.4
-1356655465.0085-0.011915
Output for 5.5.3
-1356655465.0095-0.013446
Output for 5.5.2
-1356655465.0079-0.011204
Output for 5.5.1
-1356655465.0065-0.008765
Output for 5.5.0
-1356655465.0084-0.011453
Output for 5.4.45
-1356655465.0056-0.008228
Output for 5.4.44
-1356655465.0071-0.010123
Output for 5.4.43
-1356655465.0064-0.009317
Output for 5.4.42
-1356655465.0076-0.011092
Output for 5.4.41
-1356655465.0082-0.011922
Output for 5.4.40
-1356655465.008-0.011714
Output for 5.4.39
-1356655465.0065-0.009505
Output for 5.4.38
-1356655465.0066-0.009681
Output for 5.4.37
-1356655465.0062-0.008292
Output for 5.4.36
-1356655465.0088-0.012823
Output for 5.4.35
-1356655465.0046-0.006776
Output for 5.4.34
-1356655465.0085-0.012056
Output for 5.4.32
-1356655465.0066-0.009921
Output for 5.4.31
-1356655465.0077-0.011047
Output for 5.4.30
-1356655465.0078-0.011582
Output for 5.4.29
-1356655465.0095-0.013173
Output for 5.4.28
-1356655465.0079-0.01143
Output for 5.4.27
-1356655465.0073-0.010697
Output for 5.4.26
-1356655465.008-0.011663
Output for 5.4.25
-1356655465.0085-0.012073
Output for 5.4.24
-1356655465.0081-0.011791
Output for 5.4.23
-1356655465.0072-0.010456
Output for 5.4.22
-1356655465.009-0.012654
Output for 5.4.21
-1356655465.008-0.011761
Output for 5.4.20
-1356655465.0071-0.01035
Output for 5.4.19
-1356655465.0077-0.011194
Output for 5.4.18
-1356655465.0078-0.011448
Output for 5.4.17
-1356655465.0069-0.009901
Output for 5.4.16
-1356655465.0077-0.011347
Output for 5.4.15
-1356655465.0081-0.01186
Output for 5.4.14
-1356655465.005-0.007918
Output for 5.4.13
-1356655465.0059-0.009079
Output for 5.4.12
-1356655465.0044-0.007021
Output for 5.4.11
-1356655465.0064-0.009968
Output for 5.4.10
-1356655465.0045-0.007155
Output for 5.4.9
-1356655465.0054-0.008643
Output for 5.4.8
-1356655465.0042-0.006682
Output for 5.4.7
-1356655465.0052-0.008271
Output for 5.4.6
-1356655465.0058-0.008953
Output for 5.4.5
-1356655465.0065-0.010507
Output for 5.4.4
-1356655465.0051-0.007916
Output for 5.4.3
-1356655465.0062-0.009557
Output for 5.4.2
-1356655465.0059-0.009199
Output for 5.4.1
-1356655465.0053-0.008678
Output for 5.4.0
-1356655465.0078-0.011806
Output for 5.3.29
-1356655465.0056-0.00908
Output for 5.3.28
-1356655465.006-0.009884
Output for 5.3.27
-1356655465.0069-0.011145
Output for 5.3.26
-1356655465.0067-0.010888
Output for 5.3.25
-1356655465.0056-0.009122
Output for 5.3.24
-1356655465.0062-0.010006
Output for 5.3.23
-1356655465.0066-0.010754
Output for 5.3.22
-1356655465.0058-0.009604
Output for 5.3.21
-1356655465.0084-0.013361
Output for 5.3.20
-1356655465.0041-0.006662
Output for 5.3.19
-1356655465.0062-0.009603
Output for 5.3.18
-1356655465.0046-0.007542
Output for 5.3.17
-1356655465.0064-0.010202
Output for 5.3.16
-1356655465.0068-0.011078
Output for 5.3.15
-1356655465.0072-0.01142
Output for 5.3.14
-1356655465.0057-0.009045
Output for 5.3.13
-1356655465.0069-0.011398
Output for 5.3.12
-1356655465.0063-0.009255
Output for 5.3.11
-1356655465.0069-0.011289
Output for 5.3.10
-1356655465.0067-0.011147
Output for 5.3.9
-1356655465.0066-0.010923
Output for 5.3.8
-1356655465.0056-0.008966
Output for 5.3.7
-1356655465.0064-0.01001
Output for 5.3.6
-1356655465.0073-0.011068
Output for 5.3.5
-1356655465.0062-0.010034
Output for 5.3.4
-1356655465.0065-0.010569
Output for 5.3.3
-1356655465.0069-0.011162
Output for 5.3.2
-1356655465.0071-0.011545
Output for 5.3.1
-1356655465.0055-0.008906
Output for 5.3.0
-1356655465.0069-0.011109
Output for 5.2.17
-1356655465.0091-0.01564
Output for 5.2.16
-1356655465.0076-0.013142
Output for 5.2.15
-1356655465.0089-0.015238
Output for 5.2.14
-1356655465.0067-0.011427
Output for 5.2.13
-1356655465.0099-0.017021
Output for 5.2.12
-1356655465.0079-0.013636
Output for 5.2.11
-1356655465.0063-0.010557
Output for 5.2.10
-1356655465.0097-0.016603
Output for 5.2.9
-1356655465.0095-0.016393
Output for 5.2.8
-1356655465.0078-0.01353
Output for 5.2.7
-1356655465.0104-0.017731
Output for 5.2.6
-1356655465.0093-0.016075
Output for 5.2.5
-1356655465.0101-0.017381
Output for 5.2.4
-1356655465.0097-0.016699
Output for 5.2.3
-1356655465.01-0.017154
Output for 5.2.2
-1356655465.0093-0.015925
Output for 5.2.1
-1356655465.0068-0.011768
Output for 5.2.0
-1356655465.0063-0.010995
Output for 5.1.6
-1356655465.0106-0.01851
Output for 5.1.5
-1356655465.0092-0.015315
Output for 5.1.4
-1356655465.0101-0.017727
Output for 5.1.3
-1356655465.01-0.017015
Output for 5.1.2
-1356655465.0077-0.013396
Output for 5.1.1
-1356655465.0096-0.016949
Output for 5.1.0
-1356655465.0095-0.016502
Output for 5.0.5
-1356655465.0128-0.023179
Output for 5.0.4
-1356655465.0111-0.020794
Output for 5.0.3
-1356655465.008-0.014855
Output for 5.0.2
-1356655465.0112-0.018726
Output for 5.0.1
-1356655465.0125-0.022754
Output for 5.0.0
-1356655465.0095-0.018022
Output for 4.4.9
-0.006501-0.012369
Output for 4.4.8
-0.01319-0.022409
Output for 4.4.7
-0.012244-0.022729
Output for 4.4.6
-0.012622-0.023565
Output for 4.4.5
-0.012102-0.022447
Output for 4.4.4
-0.01144-0.021321
Output for 4.4.3
-0.012551-0.023327
Output for 4.4.2
-0.012696-0.022422
Output for 4.4.1
-0.010874-0.020133
Output for 4.4.0
-0.010845-0.020253
Output for 4.3.11
-0.011017-0.02054
Output for 4.3.10
-0.010795-0.019681
Output for 4.3.9
-0.011236-0.020887
Output for 4.3.8
-0.013255-0.025138
Output for 4.3.7
-0.010286-0.019714
Output for 4.3.6
-0.013583-0.024517
Output for 4.3.5
-0.012013-0.022517
Output for 4.3.4
-0.01193-0.022287
Output for 4.3.3
-0.012369-0.023037
Output for 4.3.2
-0.012138-0.022625
Output for 4.3.1
-0.010925-0.020524
Output for 4.3.0
-0.012203-0.022551