3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $count = 50; $start = microtime(true); $y = 0; for($i = 0; $i < $count; $i++) { $code = ' $ret = ""; for ($i=0; $i<100; $i++) { $ret.= md5($i.$ret); } return $ret; '; eval($code); } printf("#1, result is %d, done in %f\n", $y, microtime(true) - $start); $start = microtime(true); $y = 0; // for($i = 0; $i < $count; $i++) // { $f = function() { // return ++$y; $ret = ''; for ($i=0; $i<100; $i++) { $ret.= md5($i.$ret); } return $ret; }; $f(); // } printf("#2, result is %d, done in %f\n", $y, microtime(true) - $start); ?>
Output for 7.1.0
#1, result is 0, done in 0.000301 #2, result is 0, done in 0.000287
Output for 7.0.14
#1, result is 0, done in 0.000458 #2, result is 0, done in 0.000440
Output for 7.0.12
#1, result is 0, done in 0.000490 #2, result is 0, done in 0.000488
Output for 7.0.6
#1, result is 0, done in 0.000498 #2, result is 0, done in 0.000452
Output for 7.0.5
#1, result is 0, done in 0.000529 #2, result is 0, done in 0.000483
Output for 7.0.4
#1, result is 0, done in 0.000368 #2, result is 0, done in 0.000347
Output for 7.0.3
#1, result is 0, done in 0.000447 #2, result is 0, done in 0.000439
Output for 7.0.2
#1, result is 0, done in 0.000318 #2, result is 0, done in 0.000303
Output for 7.0.1
#1, result is 0, done in 0.000467 #2, result is 0, done in 0.000438
Output for 7.0.0
#1, result is 0, done in 0.000450 #2, result is 0, done in 0.000435
Output for 5.6.21
#1, result is 0, done in 0.000514 #2, result is 0, done in 0.000491
Output for 5.6.20
#1, result is 0, done in 0.000430 #2, result is 0, done in 0.000414
Output for 5.6.19
#1, result is 0, done in 0.000516 #2, result is 0, done in 0.000486
Output for 5.6.18
#1, result is 0, done in 0.000478 #2, result is 0, done in 0.000443
Output for 5.6.17
#1, result is 0, done in 0.000471 #2, result is 0, done in 0.000448
Output for 5.6.16
#1, result is 0, done in 0.000393 #2, result is 0, done in 0.000382
Output for 5.6.15
#1, result is 0, done in 0.000492 #2, result is 0, done in 0.000475
Output for 5.6.14
#1, result is 0, done in 0.000457 #2, result is 0, done in 0.000428
Output for 5.6.13
#1, result is 0, done in 0.000472 #2, result is 0, done in 0.000457
Output for 5.6.12
#1, result is 0, done in 0.000490 #2, result is 0, done in 0.000486
Output for 5.6.11
#1, result is 0, done in 0.000410 #2, result is 0, done in 0.000389
Output for 5.6.10
#1, result is 0, done in 0.000464 #2, result is 0, done in 0.000444
Output for 5.6.9
#1, result is 0, done in 0.000486 #2, result is 0, done in 0.000474
Output for 5.6.8
#1, result is 0, done in 0.000514 #2, result is 0, done in 0.000486
Output for 5.6.7
#1, result is 0, done in 0.000583 #2, result is 0, done in 0.000523
Output for 5.6.6
#1, result is 0, done in 0.000487 #2, result is 0, done in 0.000475
Output for 5.4.24, 5.6.5
#1, result is 0, done in 0.000491 #2, result is 0, done in 0.000475
Output for 5.5.30, 5.6.4
#1, result is 0, done in 0.000382 #2, result is 0, done in 0.000362
Output for 5.6.3
#1, result is 0, done in 0.000511 #2, result is 0, done in 0.000488
Output for 5.6.2
#1, result is 0, done in 0.000512 #2, result is 0, done in 0.000515
Output for 5.6.1
#1, result is 0, done in 0.000522 #2, result is 0, done in 0.000490
Output for 5.6.0
#1, result is 0, done in 0.000488 #2, result is 0, done in 0.000466
Output for 5.5.35
#1, result is 0, done in 0.000258 #2, result is 0, done in 0.000265
Output for 5.5.34
#1, result is 0, done in 0.000466 #2, result is 0, done in 0.000444
Output for 5.5.33
#1, result is 0, done in 0.000396 #2, result is 0, done in 0.000377
Output for 5.5.32
#1, result is 0, done in 0.000489 #2, result is 0, done in 0.000465
Output for 5.5.31
#1, result is 0, done in 0.000523 #2, result is 0, done in 0.000497
Output for 5.5.29
#1, result is 0, done in 0.000412 #2, result is 0, done in 0.000394
Output for 5.5.28
#1, result is 0, done in 0.000492 #2, result is 0, done in 0.000465
Output for 5.4.22, 5.5.27
#1, result is 0, done in 0.000512 #2, result is 0, done in 0.000499
Output for 5.5.26
#1, result is 0, done in 0.000448 #2, result is 0, done in 0.000427
Output for 5.5.25
#1, result is 0, done in 0.000514 #2, result is 0, done in 0.000536
Output for 5.5.24
#1, result is 0, done in 0.000359 #2, result is 0, done in 0.000338
Output for 5.5.23
#1, result is 0, done in 0.000465 #2, result is 0, done in 0.000455
Output for 5.5.22
#1, result is 0, done in 0.000466 #2, result is 0, done in 0.000446
Output for 5.5.21
#1, result is 0, done in 0.000472 #2, result is 0, done in 0.000455
Output for 5.5.20
#1, result is 0, done in 0.000412 #2, result is 0, done in 0.000417
Output for 5.5.19
#1, result is 0, done in 0.000428 #2, result is 0, done in 0.000407
Output for 5.5.18
#1, result is 0, done in 0.000513 #2, result is 0, done in 0.000488
Output for 5.5.16
#1, result is 0, done in 0.000474 #2, result is 0, done in 0.000455
Output for 5.5.15
#1, result is 0, done in 0.000468 #2, result is 0, done in 0.000448
Output for 5.5.14
#1, result is 0, done in 0.000524 #2, result is 0, done in 0.000492
Output for 5.5.13
#1, result is 0, done in 0.000490 #2, result is 0, done in 0.000465
Output for 5.5.12
#1, result is 0, done in 0.000467 #2, result is 0, done in 0.000442
Output for 5.5.11
#1, result is 0, done in 0.000389 #2, result is 0, done in 0.000326
Output for 5.5.10
#1, result is 0, done in 0.000429 #2, result is 0, done in 0.000393
Output for 5.5.9
#1, result is 0, done in 0.000522 #2, result is 0, done in 0.000498
Output for 5.5.8
#1, result is 0, done in 0.000573 #2, result is 0, done in 0.000519
Output for 5.5.7
#1, result is 0, done in 0.000541 #2, result is 0, done in 0.000526
Output for 5.5.6
#1, result is 0, done in 0.000467 #2, result is 0, done in 0.000454
Output for 5.5.5
#1, result is 0, done in 0.000523 #2, result is 0, done in 0.000492
Output for 5.5.4
#1, result is 0, done in 0.000488 #2, result is 0, done in 0.000478
Output for 5.5.3
#1, result is 0, done in 0.000313 #2, result is 0, done in 0.000304
Output for 5.5.2
#1, result is 0, done in 0.000489 #2, result is 0, done in 0.000480
Output for 5.5.1
#1, result is 0, done in 0.000511 #2, result is 0, done in 0.000506
Output for 5.5.0
#1, result is 0, done in 0.000538 #2, result is 0, done in 0.000513
Output for 5.4.8, 5.4.45
#1, result is 0, done in 0.000468 #2, result is 0, done in 0.000443
Output for 5.4.44
#1, result is 0, done in 0.000398 #2, result is 0, done in 0.000376
Output for 5.4.28, 5.4.43
#1, result is 0, done in 0.000494 #2, result is 0, done in 0.000465
Output for 5.4.42
#1, result is 0, done in 0.000515 #2, result is 0, done in 0.000488
Output for 5.4.41
#1, result is 0, done in 0.000498 #2, result is 0, done in 0.000473
Output for 5.4.40
#1, result is 0, done in 0.000446 #2, result is 0, done in 0.000432
Output for 5.4.39
#1, result is 0, done in 0.000543 #2, result is 0, done in 0.000475
Output for 5.4.38
#1, result is 0, done in 0.000448 #2, result is 0, done in 0.000424
Output for 5.4.37
#1, result is 0, done in 0.000492 #2, result is 0, done in 0.000504
Output for 5.4.36
#1, result is 0, done in 0.000428 #2, result is 0, done in 0.000445
Output for 5.4.35
#1, result is 0, done in 0.000442 #2, result is 0, done in 0.000412
Output for 5.4.34
#1, result is 0, done in 0.000487 #2, result is 0, done in 0.000479
Output for 5.4.32
#1, result is 0, done in 0.000499 #2, result is 0, done in 0.000444
Output for 5.4.31
#1, result is 0, done in 0.000488 #2, result is 0, done in 0.000463
Output for 5.4.30
#1, result is 0, done in 0.000530 #2, result is 0, done in 0.000488
Output for 5.4.29
#1, result is 0, done in 0.000467 #2, result is 0, done in 0.000457
Output for 5.4.27
#1, result is 0, done in 0.000397 #2, result is 0, done in 0.000378
Output for 5.4.26
#1, result is 0, done in 0.000360 #2, result is 0, done in 0.000298
Output for 5.4.25
#1, result is 0, done in 0.000482 #2, result is 0, done in 0.000456
Output for 5.4.23
#1, result is 0, done in 0.000511 #2, result is 0, done in 0.000500
Output for 5.4.21
#1, result is 0, done in 0.000490 #2, result is 0, done in 0.000485
Output for 5.4.20
#1, result is 0, done in 0.000412 #2, result is 0, done in 0.000391
Output for 5.4.19
#1, result is 0, done in 0.000470 #2, result is 0, done in 0.000426
Output for 5.4.18
#1, result is 0, done in 0.000513 #2, result is 0, done in 0.000497
Output for 5.4.17
#1, result is 0, done in 0.000523 #2, result is 0, done in 0.000464
Output for 5.4.16
#1, result is 0, done in 0.000510 #2, result is 0, done in 0.000486
Output for 5.4.15
#1, result is 0, done in 0.000321 #2, result is 0, done in 0.000296
Output for 5.4.14
#1, result is 0, done in 0.000361 #2, result is 0, done in 0.000342
Output for 5.4.13
#1, result is 0, done in 0.000521 #2, result is 0, done in 0.000499
Output for 5.4.12
#1, result is 0, done in 0.000545 #2, result is 0, done in 0.000508
Output for 5.4.11
#1, result is 0, done in 0.000514 #2, result is 0, done in 0.000488
Output for 5.4.10
#1, result is 0, done in 0.000411 #2, result is 0, done in 0.000400
Output for 5.4.9
#1, result is 0, done in 0.000571 #2, result is 0, done in 0.000511
Output for 5.4.7
#1, result is 0, done in 0.000542 #2, result is 0, done in 0.000517
Output for 5.4.6
#1, result is 0, done in 0.000532 #2, result is 0, done in 0.000521
Output for 5.4.5
#1, result is 0, done in 0.000430 #2, result is 0, done in 0.000418
Output for 5.4.4
#1, result is 0, done in 0.000512 #2, result is 0, done in 0.000490
Output for 5.4.3
#1, result is 0, done in 0.000512 #2, result is 0, done in 0.000505
Output for 5.4.2
#1, result is 0, done in 0.000526 #2, result is 0, done in 0.000497
Output for 5.4.1
#1, result is 0, done in 0.000484 #2, result is 0, done in 0.000459
Output for 5.4.0
#1, result is 0, done in 0.000516 #2, result is 0, done in 0.000516
Output for 5.3.29
#1, result is 0, done in 0.000477 #2, result is 0, done in 0.000453
Output for 5.3.28
#1, result is 0, done in 0.000544 #2, result is 0, done in 0.000523
Output for 5.3.27
#1, result is 0, done in 0.000478 #2, result is 0, done in 0.000456
Output for 5.3.26
#1, result is 0, done in 0.000357 #2, result is 0, done in 0.000341
Output for 5.3.25
#1, result is 0, done in 0.000534 #2, result is 0, done in 0.000562
Output for 5.3.24
#1, result is 0, done in 0.000386 #2, result is 0, done in 0.000385
Output for 5.3.23
#1, result is 0, done in 0.000536 #2, result is 0, done in 0.000512
Output for 5.3.22
#1, result is 0, done in 0.000489 #2, result is 0, done in 0.000471
Output for 5.3.21
#1, result is 0, done in 0.000544 #2, result is 0, done in 0.000510
Output for 5.3.20
#1, result is 0, done in 0.000532 #2, result is 0, done in 0.000507
Output for 5.3.19
#1, result is 0, done in 0.000531 #2, result is 0, done in 0.000510
Output for 5.3.18
#1, result is 0, done in 0.000536 #2, result is 0, done in 0.000507
Output for 5.3.17
#1, result is 0, done in 0.000525 #2, result is 0, done in 0.000484
Output for 5.3.16
#1, result is 0, done in 0.000540 #2, result is 0, done in 0.000510
Output for 5.3.15
#1, result is 0, done in 0.000409 #2, result is 0, done in 0.000390
Output for 5.3.14
#1, result is 0, done in 0.000409 #2, result is 0, done in 0.000391
Output for 5.3.13
#1, result is 0, done in 0.000529 #2, result is 0, done in 0.000509
Output for 5.3.12
#1, result is 0, done in 0.000532 #2, result is 0, done in 0.000510
Output for 5.3.11
#1, result is 0, done in 0.000407 #2, result is 0, done in 0.000414
Output for 5.3.10
#1, result is 0, done in 0.000529 #2, result is 0, done in 0.000506
Output for 5.3.9
#1, result is 0, done in 0.000471 #2, result is 0, done in 0.000449
Output for 5.3.8
#1, result is 0, done in 0.000357 #2, result is 0, done in 0.000340
Output for 5.3.7
#1, result is 0, done in 0.000542 #2, result is 0, done in 0.000525
Output for 5.3.6
#1, result is 0, done in 0.000545 #2, result is 0, done in 0.000530
Output for 5.3.5
#1, result is 0, done in 0.000470 #2, result is 0, done in 0.000468
Output for 5.3.4
#1, result is 0, done in 0.000470 #2, result is 0, done in 0.000451
Output for 5.3.3
#1, result is 0, done in 0.000390 #2, result is 0, done in 0.000342
Output for 5.3.2
#1, result is 0, done in 0.000538 #2, result is 0, done in 0.000497
Output for 5.3.1
#1, result is 0, done in 0.000401 #2, result is 0, done in 0.000416
Output for 5.3.0
#1, result is 0, done in 0.000360 #2, result is 0, done in 0.000341
Output for 5.2.3 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION in /in/Z3esD on line 23
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.2
<br /> <b>Parse error</b>: syntax error, unexpected T_FUNCTION in <b>/in/Z3esD</b> on line <b>23</b><br />
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
<br /> <b>Parse error</b>: parse error, unexpected T_FUNCTION in <b>/in/Z3esD</b> on line <b>23</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.3.4
<br /> <b>Parse error</b>: parse error in <b>/in/Z3esD</b> on line <b>23</b><br />
Process exited with code 255.