3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $count = 50; $start = microtime(true); $code = ' $ret = ""; for ($i=0; $i<100; $i++) { $ret.= md5($i.$ret); } return $ret; '; for($i = 0; $i < $count; $i++) { eval($code); } printf("#1, done in %f\n", microtime(true) - $start); $start = microtime(true); $f = function() { // return ++$y; $ret = ''; for ($i=0; $i<100; $i++) { $ret.= md5($i.$ret); } return $ret; }; for($i = 0; $i < $count; $i++) { $f(); } printf("#2, done in %f\n", microtime(true) - $start); ?>
Output for 7.2.0
#1, done in 0.000584 #2, done in 0.014561
Output for 7.1.7
#1, done in 0.000308 #2, done in 0.014530
Output for 7.1.6
#1, done in 0.000714 #2, done in 0.031123
Output for 7.1.5
#1, done in 0.000761 #2, done in 0.032479
Output for 7.1.0
#1, done in 0.000453 #2, done in 0.021101
Output for 7.0.20
#1, done in 0.000319 #2, done in 0.014866
Output for 7.0.14
#1, done in 0.000469 #2, done in 0.021868
Output for 7.0.6
#1, done in 0.000406 #2, done in 0.017465
Output for 7.0.5
#1, done in 0.000503 #2, done in 0.021272
Output for 7.0.4
#1, done in 0.000423 #2, done in 0.019432
Output for 7.0.3
#1, done in 0.000305 #2, done in 0.013867
Output for 7.0.2
#1, done in 0.000342 #2, done in 0.015659
Output for 7.0.1
#1, done in 0.000351 #2, done in 0.015939
Output for 7.0.0
#1, done in 0.000446 #2, done in 0.020248
Output for 5.6.28
#1, done in 0.000550 #2, done in 0.023855
Output for 5.6.21
#1, done in 0.000511 #2, done in 0.022781
Output for 5.6.20
#1, done in 0.000488 #2, done in 0.022293
Output for 5.6.19
#1, done in 0.000484 #2, done in 0.021462
Output for 5.6.18
#1, done in 0.000448 #2, done in 0.020529
Output for 5.6.17
#1, done in 0.000453 #2, done in 0.020195
Output for 5.6.16
#1, done in 0.000368 #2, done in 0.016524
Output for 5.6.15
#1, done in 0.000305 #2, done in 0.014228
Output for 5.6.14
#1, done in 0.000494 #2, done in 0.022366
Output for 5.6.13
#1, done in 0.000512 #2, done in 0.022858
Output for 5.6.12
#1, done in 0.000313 #2, done in 0.014722
Output for 5.6.11
#1, done in 0.000313 #2, done in 0.014243
Output for 5.6.10
#1, done in 0.000497 #2, done in 0.020418
Output for 5.6.9
#1, done in 0.000536 #2, done in 0.022288
Output for 5.6.8
#1, done in 0.000305 #2, done in 0.014421
Output for 5.6.7
#1, done in 0.000275 #2, done in 0.012160
Output for 5.5.35
#1, done in 0.000487 #2, done in 0.021830
Output for 5.5.34
#1, done in 0.000332 #2, done in 0.015848
Output for 5.5.33
#1, done in 0.000463 #2, done in 0.021045
Output for 5.5.32
#1, done in 0.000448 #2, done in 0.020358
Output for 5.5.31
#1, done in 0.000454 #2, done in 0.019811
Output for 5.5.30
#1, done in 0.000604 #2, done in 0.020779
Output for 5.5.29
#1, done in 0.000323 #2, done in 0.014736
Output for 5.5.28
#1, done in 0.000381 #2, done in 0.017521
Output for 5.5.27
#1, done in 0.000370 #2, done in 0.016638
Output for 5.5.26
#1, done in 0.000344 #2, done in 0.015832
Output for 5.5.25
#1, done in 0.000381 #2, done in 0.017179
Output for 5.5.24
#1, done in 0.000465 #2, done in 0.020902
Output for 5.4.45
#1, done in 0.000473 #2, done in 0.020254
Output for 5.4.44
#1, done in 0.000518 #2, done in 0.019994
Output for 5.4.43
#1, done in 0.000433 #2, done in 0.019687
Output for 5.4.42
#1, done in 0.000430 #2, done in 0.024001
Output for 5.4.41
#1, done in 0.001145 #2, done in 0.022575
Output for 5.4.40
#1, done in 0.000462 #2, done in 0.020932
Output for 5.4.39
#1, done in 0.000510 #2, done in 0.023700
Output for 5.4.38
#1, done in 0.000445 #2, done in 0.020813
Output for 5.4.37
#1, done in 0.000472 #2, done in 0.021224
Output for 5.4.36
#1, done in 0.000453 #2, done in 0.020362
Output for 5.4.35
#1, done in 0.000371 #2, done in 0.043779
Output for 5.4.34
#1, done in 0.000377 #2, done in 0.017234
Output for 5.4.32
#1, done in 0.000340 #2, done in 0.014678
Output for 5.4.31
#1, done in 0.000305 #2, done in 0.014739
Output for 5.4.30
#1, done in 0.000358 #2, done in 0.015433
Output for 5.4.29
#1, done in 0.000336 #2, done in 0.015418
Output for 5.4.28
#1, done in 0.000789 #2, done in 0.017291
Output for 5.4.27
#1, done in 0.000307 #2, done in 0.014517
Output for 5.4.26
#1, done in 0.000317 #2, done in 0.014753
Output for 5.4.25
#1, done in 0.000440 #2, done in 0.021174
Output for 5.4.24
#1, done in 0.000468 #2, done in 0.021727
Output for 5.4.23
#1, done in 0.000435 #2, done in 0.020577
Output for 5.4.22
#1, done in 0.000429 #2, done in 0.019901
Output for 5.4.21
#1, done in 0.000536 #2, done in 0.020981
Output for 5.4.20
#1, done in 0.000426 #2, done in 0.021015
Output for 5.4.19
#1, done in 0.000453 #2, done in 0.020061
Output for 5.4.18
#1, done in 0.000426 #2, done in 0.020321
Output for 5.4.17
#1, done in 0.000451 #2, done in 0.020222
Output for 5.4.16
#1, done in 0.000438 #2, done in 0.020869
Output for 5.4.15
#1, done in 0.000439 #2, done in 0.022506
Output for 5.4.14
#1, done in 0.000448 #2, done in 0.022025
Output for 5.4.13
#1, done in 0.000450 #2, done in 0.021236
Output for 5.4.12
#1, done in 0.000565 #2, done in 0.022716
Output for 5.4.11
#1, done in 0.000499 #2, done in 0.023378
Output for 5.4.10
#1, done in 0.000447 #2, done in 0.020840
Output for 5.4.9
#1, done in 0.000536 #2, done in 0.026034
Output for 5.4.8
#1, done in 0.000504 #2, done in 0.020934
Output for 5.4.7
#1, done in 0.000458 #2, done in 0.019996
Output for 5.4.6
#1, done in 0.000430 #2, done in 0.020131
Output for 5.4.5
#1, done in 0.000425 #2, done in 0.020093
Output for 5.4.4
#1, done in 0.000424 #2, done in 0.020782
Output for 5.4.3
#1, done in 0.000430 #2, done in 0.020547
Output for 5.4.2
#1, done in 0.000425 #2, done in 0.020796
Output for 5.4.1
#1, done in 0.000492 #2, done in 0.020633
Output for 5.4.0
#1, done in 0.000456 #2, done in 0.021634
Output for 5.3.29
#1, done in 0.000323 #2, done in 0.015744
Output for 5.3.28
#1, done in 0.000448 #2, done in 0.021340
Output for 5.3.27
#1, done in 0.000463 #2, done in 0.021917
Output for 5.3.26
#1, done in 0.000466 #2, done in 0.021903
Output for 5.3.25
#1, done in 0.000461 #2, done in 0.021937
Output for 5.3.24
#1, done in 0.000460 #2, done in 0.021927
Output for 5.3.23
#1, done in 0.000460 #2, done in 0.022474
Output for 5.3.22
#1, done in 0.000593 #2, done in 0.027136
Output for 5.3.21
#1, done in 0.000466 #2, done in 0.022627
Output for 5.3.20
#1, done in 0.000457 #2, done in 0.023033
Output for 5.3.19
#1, done in 0.000561 #2, done in 0.050021
Output for 5.3.18
#1, done in 0.000477 #2, done in 0.021897
Output for 5.3.17
#1, done in 0.000527 #2, done in 0.022843
Output for 5.3.16
#1, done in 0.000470 #2, done in 0.023689
Output for 5.3.15
#1, done in 0.000615 #2, done in 0.026163
Output for 5.3.14
#1, done in 0.000463 #2, done in 0.021773
Output for 5.3.13
#1, done in 0.000529 #2, done in 0.025583
Output for 5.3.12
#1, done in 0.000454 #2, done in 0.021597
Output for 5.3.11
#1, done in 0.000456 #2, done in 0.021341
Output for 5.3.10
#1, done in 0.000490 #2, done in 0.022125
Output for 5.3.9
#1, done in 0.000456 #2, done in 0.022108
Output for 5.3.8
#1, done in 0.000460 #2, done in 0.021399
Output for 5.3.7
#1, done in 0.000452 #2, done in 0.023544
Output for 5.3.6
#1, done in 0.000451 #2, done in 0.022358
Output for 5.3.5
#1, done in 0.000453 #2, done in 0.021851
Output for 5.3.4
#1, done in 0.000502 #2, done in 0.023054
Output for 5.3.3
#1, done in 0.000527 #2, done in 0.021840
Output for 5.3.2
#1, done in 0.000449 #2, done in 0.022600
Output for 5.3.1
#1, done in 0.000564 #2, done in 0.026166
Output for 5.3.0
#1, done in 0.000522 #2, done in 0.022689
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION in /in/uV05h on line 20
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 T_FUNCTION in /in/uV05h on line 20
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/uV05h on line 20
Process exited with code 255.