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.000481 #2, result is 0, done in 0.000467
Output for 7.0.14
#1, result is 0, done in 0.000498 #2, result is 0, done in 0.000483
Output for 7.0.8
#1, result is 0, done in 0.000354 #2, result is 0, done in 0.000313
Output for 7.0.7
#1, result is 0, done in 0.000352 #2, result is 0, done in 0.000312
Output for 7.0.6
#1, result is 0, done in 0.000327 #2, result is 0, done in 0.000293
Output for 7.0.5
#1, result is 0, done in 0.000461 #2, result is 0, done in 0.000419
Output for 7.0.4
#1, result is 0, done in 0.000300 #2, result is 0, done in 0.000285
Output for 7.0.3
#1, result is 0, done in 0.000427 #2, result is 0, done in 0.000409
Output for 7.0.2
#1, result is 0, done in 0.000492 #2, result is 0, done in 0.000470
Output for 7.0.1
#1, result is 0, done in 0.000446 #2, result is 0, done in 0.000438
Output for 7.0.0
#1, result is 0, done in 0.000468 #2, result is 0, done in 0.000463
Output for hhvm-3.12.0
#1, result is 0, done in 0.001106 #2, result is 0, done in 0.000340
Output for hhvm-3.10.0
#1, result is 0, done in 0.001146 #2, result is 0, done in 0.000366
Output for 5.6.28
#1, result is 0, done in 0.000517 #2, result is 0, done in 0.000516
Output for 5.6.23
#1, result is 0, done in 0.000374 #2, result is 0, done in 0.000363
Output for 5.6.22
#1, result is 0, done in 0.000495 #2, result is 0, done in 0.000471
Output for 5.6.21
#1, result is 0, done in 0.000495 #2, result is 0, done in 0.000444
Output for 5.6.20
#1, result is 0, done in 0.000312 #2, result is 0, done in 0.000309
Output for 5.6.19
#1, result is 0, done in 0.000319 #2, result is 0, done in 0.000297
Output for 5.6.18
#1, result is 0, done in 0.000379 #2, result is 0, done in 0.000362
Output for 5.6.17
#1, result is 0, done in 0.000472 #2, result is 0, done in 0.000453
Output for 5.5.12, 5.6.16
#1, result is 0, done in 0.000332 #2, result is 0, done in 0.000315
Output for 5.3.14, 5.6.15
#1, result is 0, done in 0.000387 #2, result is 0, done in 0.000367
Output for 5.6.14
#1, result is 0, done in 0.000517 #2, result is 0, done in 0.000511
Output for 5.6.13
#1, result is 0, done in 0.000373 #2, result is 0, done in 0.000369
Output for 5.4.22, 5.6.12
#1, result is 0, done in 0.000321 #2, result is 0, done in 0.000305
Output for 5.6.11
#1, result is 0, done in 0.000515 #2, result is 0, done in 0.000502
Output for 5.6.10
#1, result is 0, done in 0.000439 #2, result is 0, done in 0.000413
Output for 5.6.9
#1, result is 0, done in 0.000317 #2, result is 0, done in 0.000300
Output for 5.6.8
#1, result is 0, done in 0.000488 #2, result is 0, done in 0.000466
Output for 5.6.7
#1, result is 0, done in 0.000354 #2, result is 0, done in 0.000346
Output for 5.6.6
#1, result is 0, done in 0.000353 #2, result is 0, done in 0.000352
Output for 5.6.5
#1, result is 0, done in 0.000512 #2, result is 0, done in 0.000509
Output for 5.6.4
#1, result is 0, done in 0.000380 #2, result is 0, done in 0.000364
Output for 5.6.3
#1, result is 0, done in 0.000384 #2, result is 0, done in 0.000348
Output for 5.6.2
#1, result is 0, done in 0.000466 #2, result is 0, done in 0.000443
Output for 5.6.1
#1, result is 0, done in 0.000429 #2, result is 0, done in 0.000407
Output for 5.6.0
#1, result is 0, done in 0.000490 #2, result is 0, done in 0.000425
Output for 5.5.37
#1, result is 0, done in 0.000451 #2, result is 0, done in 0.000431
Output for 5.5.36
#1, result is 0, done in 0.000428 #2, result is 0, done in 0.000395
Output for 5.5.35
#1, result is 0, done in 0.000367 #2, result is 0, done in 0.000350
Output for 5.5.34
#1, result is 0, done in 0.000418 #2, result is 0, done in 0.000426
Output for 5.5.33
#1, result is 0, done in 0.000440 #2, result is 0, done in 0.000409
Output for 5.5.32
#1, result is 0, done in 0.000399 #2, result is 0, done in 0.000383
Output for 5.5.31
#1, result is 0, done in 0.000428 #2, result is 0, done in 0.000408
Output for 5.5.30
#1, result is 0, done in 0.000365 #2, result is 0, done in 0.000299
Output for 5.5.29
#1, result is 0, done in 0.000399 #2, result is 0, done in 0.000397
Output for 5.5.28
#1, result is 0, done in 0.000422 #2, result is 0, done in 0.000396
Output for 5.5.27
#1, result is 0, done in 0.000514 #2, result is 0, done in 0.000490
Output for 5.5.26
#1, result is 0, done in 0.000381 #2, result is 0, done in 0.000363
Output for 5.5.25
#1, result is 0, done in 0.000545 #2, result is 0, done in 0.000504
Output for 5.5.24
#1, result is 0, done in 0.000368 #2, result is 0, done in 0.000357
Output for 5.5.23
#1, result is 0, done in 0.000413 #2, result is 0, done in 0.000394
Output for 5.5.22
#1, result is 0, done in 0.000314 #2, result is 0, done in 0.000297
Output for 5.5.21
#1, result is 0, done in 0.000536 #2, result is 0, done in 0.000501
Output for 5.5.20
#1, result is 0, done in 0.000397 #2, result is 0, done in 0.000376
Output for 5.5.19
#1, result is 0, done in 0.000422 #2, result is 0, done in 0.000391
Output for 5.5.13, 5.5.18
#1, result is 0, done in 0.000539 #2, result is 0, done in 0.000515
Output for 5.5.16
#1, result is 0, done in 0.000489 #2, result is 0, done in 0.000465
Output for 5.5.15
#1, result is 0, done in 0.000334 #2, result is 0, done in 0.000318
Output for 5.5.14
#1, result is 0, done in 0.000513 #2, result is 0, done in 0.000489
Output for 5.5.11
#1, result is 0, done in 0.000484 #2, result is 0, done in 0.000450
Output for 5.5.10
#1, result is 0, done in 0.000474 #2, result is 0, done in 0.000446
Output for 5.5.9
#1, result is 0, done in 0.000397 #2, result is 0, done in 0.000391
Output for 5.5.8
#1, result is 0, done in 0.000513 #2, result is 0, done in 0.000488
Output for 5.5.7
#1, result is 0, done in 0.000366 #2, result is 0, done in 0.000350
Output for 5.5.6
#1, result is 0, done in 0.000343 #2, result is 0, done in 0.000332
Output for 5.5.5
#1, result is 0, done in 0.000540 #2, result is 0, done in 0.000527
Output for 5.5.4
#1, result is 0, done in 0.000540 #2, result is 0, done in 0.000514
Output for 5.5.3
#1, result is 0, done in 0.000488 #2, result is 0, done in 0.000467
Output for 5.5.2
#1, result is 0, done in 0.000515 #2, result is 0, done in 0.000491
Output for 5.5.1
#1, result is 0, done in 0.000414 #2, result is 0, done in 0.000338
Output for 5.5.0
#1, result is 0, done in 0.000431 #2, result is 0, done in 0.000415
Output for 5.4.45
#1, result is 0, done in 0.000544 #2, result is 0, done in 0.000475
Output for 5.4.44
#1, result is 0, done in 0.000315 #2, result is 0, done in 0.000303
Output for 5.4.43
#1, result is 0, done in 0.000513 #2, result is 0, done in 0.000497
Output for 5.4.15, 5.4.42
#1, result is 0, done in 0.000365 #2, result is 0, done in 0.000348
Output for 5.4.41
#1, result is 0, done in 0.000314 #2, result is 0, done in 0.000296
Output for 5.4.40
#1, result is 0, done in 0.000490 #2, result is 0, done in 0.000488
Output for 5.4.39
#1, result is 0, done in 0.000530 #2, result is 0, done in 0.000505
Output for 5.4.38
#1, result is 0, done in 0.000511 #2, result is 0, done in 0.000487
Output for 5.4.37
#1, result is 0, done in 0.000465 #2, result is 0, done in 0.000453
Output for 5.4.36
#1, result is 0, done in 0.000519 #2, result is 0, done in 0.000490
Output for 5.4.35
#1, result is 0, done in 0.000554 #2, result is 0, done in 0.000426
Output for 5.4.34
#1, result is 0, done in 0.000488 #2, result is 0, done in 0.000464
Output for 5.4.32
#1, result is 0, done in 0.000482 #2, result is 0, done in 0.000454
Output for 5.4.31
#1, result is 0, done in 0.000540 #2, result is 0, done in 0.000521
Output for 5.4.30
#1, result is 0, done in 0.000448 #2, result is 0, done in 0.000435
Output for 5.4.29
#1, result is 0, done in 0.000378 #2, result is 0, done in 0.000361
Output for 5.4.28
#1, result is 0, done in 0.000426 #2, result is 0, done in 0.000406
Output for 5.4.18, 5.4.27
#1, result is 0, done in 0.000379 #2, result is 0, done in 0.000361
Output for 5.4.26
#1, result is 0, done in 0.000488 #2, result is 0, done in 0.000480
Output for 5.4.25
#1, result is 0, done in 0.000486 #2, result is 0, done in 0.000464
Output for 5.4.24
#1, result is 0, done in 0.000444 #2, result is 0, done in 0.000423
Output for 5.4.23
#1, result is 0, done in 0.000511 #2, result is 0, done in 0.000489
Output for 5.4.21
#1, result is 0, done in 0.000354 #2, result is 0, done in 0.000353
Output for 5.4.20
#1, result is 0, done in 0.000542 #2, result is 0, done in 0.000514
Output for 5.4.19
#1, result is 0, done in 0.000392 #2, result is 0, done in 0.000385
Output for 5.4.17
#1, result is 0, done in 0.000465 #2, result is 0, done in 0.000457
Output for 5.4.3, 5.4.16
#1, result is 0, done in 0.000310 #2, result is 0, done in 0.000296
Output for 5.4.14
#1, result is 0, done in 0.000497 #2, result is 0, done in 0.000400
Output for 5.4.13
#1, result is 0, done in 0.000543 #2, result is 0, done in 0.000549
Output for 5.4.12
#1, result is 0, done in 0.000318 #2, result is 0, done in 0.000300
Output for 5.4.11
#1, result is 0, done in 0.000468 #2, result is 0, done in 0.000443
Output for 5.4.10
#1, result is 0, done in 0.000538 #2, result is 0, done in 0.000513
Output for 5.4.9
#1, result is 0, done in 0.000539 #2, result is 0, done in 0.000516
Output for 5.4.8
#1, result is 0, done in 0.000453 #2, result is 0, done in 0.000428
Output for 5.4.7
#1, result is 0, done in 0.000510 #2, result is 0, done in 0.000498
Output for 5.4.6
#1, result is 0, done in 0.000464 #2, result is 0, done in 0.000473
Output for 5.4.5
#1, result is 0, done in 0.000331 #2, result is 0, done in 0.000315
Output for 5.4.4
#1, result is 0, done in 0.000348 #2, result is 0, done in 0.000311
Output for 5.4.2
#1, result is 0, done in 0.000313 #2, result is 0, done in 0.000296
Output for 5.4.1
#1, result is 0, done in 0.000408 #2, result is 0, done in 0.000388
Output for 5.3.10, 5.4.0
#1, result is 0, done in 0.000324 #2, result is 0, done in 0.000309
Output for 5.3.29
#1, result is 0, done in 0.000544 #2, result is 0, done in 0.000434
Output for 5.3.28
#1, result is 0, done in 0.000517 #2, result is 0, done in 0.000507
Output for 5.3.27
#1, result is 0, done in 0.000561 #2, result is 0, done in 0.000556
Output for 5.3.26
#1, result is 0, done in 0.000553 #2, result is 0, done in 0.000506
Output for 5.3.25
#1, result is 0, done in 0.000411 #2, result is 0, done in 0.000392
Output for 5.3.24
#1, result is 0, done in 0.000344 #2, result is 0, done in 0.000336
Output for 5.3.23
#1, result is 0, done in 0.000484 #2, result is 0, done in 0.000465
Output for 5.3.22
#1, result is 0, done in 0.000442 #2, result is 0, done in 0.000425
Output for 5.3.21
#1, result is 0, done in 0.000353 #2, result is 0, done in 0.000338
Output for 5.3.20
#1, result is 0, done in 0.000324 #2, result is 0, done in 0.000317
Output for 5.3.19
#1, result is 0, done in 0.000461 #2, result is 0, done in 0.000446
Output for 5.3.18
#1, result is 0, done in 0.000400 #2, result is 0, done in 0.000353
Output for 5.3.17
#1, result is 0, done in 0.000528 #2, result is 0, done in 0.000516
Output for 5.3.16
#1, result is 0, done in 0.000323 #2, result is 0, done in 0.000316
Output for 5.3.15
#1, result is 0, done in 0.000393 #2, result is 0, done in 0.000385
Output for 5.3.13
#1, result is 0, done in 0.000370 #2, result is 0, done in 0.000335
Output for 5.3.12
#1, result is 0, done in 0.000368 #2, result is 0, done in 0.000361
Output for 5.3.11
#1, result is 0, done in 0.000346 #2, result is 0, done in 0.000334
Output for 5.3.9
#1, result is 0, done in 0.000314 #2, result is 0, done in 0.000301
Output for 5.3.8
#1, result is 0, done in 0.000336 #2, result is 0, done in 0.000300
Output for 5.3.7
#1, result is 0, done in 0.000313 #2, result is 0, done in 0.000300
Output for 5.3.6
#1, result is 0, done in 0.000329 #2, result is 0, done in 0.000326
Output for 5.3.5
#1, result is 0, done in 0.000320 #2, result is 0, done in 0.000300
Output for 5.3.4
#1, result is 0, done in 0.000313 #2, result is 0, done in 0.000302
Output for 5.3.3
#1, result is 0, done in 0.000301 #2, result is 0, done in 0.000282
Output for 5.3.2
#1, result is 0, done in 0.000282 #2, result is 0, done in 0.000257
Output for 5.3.1
#1, result is 0, done in 0.000288 #2, result is 0, done in 0.000269
Output for 5.3.0
#1, result is 0, done in 0.000312 #2, result is 0, done in 0.000299
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION in /in/WEulq on line 23
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/WEulq on line 23
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/WEulq on line 23
Process exited with code 255.