3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $users = array_fill(0, 10000, 'name'); function userNames($users) { foreach($users as $user) { yield $user; } } $start = microtime(true) . PHP_EOL; foreach(userNames($users) as $name) { md5($name); } echo microtime(true) - $start; unset($start); echo str_repeat(PHP_EOL, 2); $start = microtime(true) . PHP_EOL; foreach($users as $name) { md5($name); } echo microtime(true) - $start;
Output for 7.1.0
Notice: A non well formed numeric value encountered in /in/muhPX on line 20 0.0038280487060547 Notice: A non well formed numeric value encountered in /in/muhPX on line 33 0.0032908916473389
Output for 7.0.14
0.004021167755127 0.0033981800079346
Output for 7.0.10
0.0039639472961426 0.0032849311828613
Output for 7.0.9
0.0024659633636475 0.0020740032196045
Output for 7.0.8
0.003486156463623 0.0030241012573242
Output for 7.0.7
0.003666877746582 0.0031969547271729
Output for 7.0.6
0.0034351348876953 0.0023221969604492
Output for 7.0.5
0.0028331279754639 0.002424955368042
Output for 7.0.4
0.0034708976745605 0.0029540061950684
Output for 7.0.3
0.003896951675415 0.0034711360931396
Output for 7.0.2
0.0033369064331055 0.0027010440826416
Output for 7.0.1
0.0033190250396729 0.0029568672180176
Output for 7.0.0
0.0039899349212646 0.00343918800354
Output for 5.6.28
0.0066561698913574 0.0043349266052246
Output for 5.6.25
0.0057837963104248 0.0038661956787109
Output for 5.6.24
0.0050489902496338 0.0034120082855225
Output for 5.6.23
0.0050818920135498 0.0033800601959229
Output for 5.6.22
0.0063769817352295 0.0041549205780029
Output for 5.6.21
0.0057129859924316 0.0039539337158203
Output for 5.6.20
0.0058028697967529 0.0038449764251709
Output for 5.6.19
0.0061118602752686 0.0041038990020752
Output for 5.6.18
0.0051279067993164 0.0033309459686279
Output for 5.6.17
0.0065410137176514 0.003993034362793
Output for 5.6.16
0.0059120655059814 0.0040099620819092
Output for 5.6.15
0.005885124206543 0.0043728351593018
Output for 5.6.14
0.0057039260864258 0.0038671493530273
Output for 5.6.13
0.0053780078887939 0.0034050941467285
Output for 5.6.12
0.0056149959564209 0.0029520988464355
Output for 5.6.11
0.0084009170532227 0.0064868927001953
Output for 5.6.10
0.0048160552978516 0.0027718544006348
Output for 5.6.9
0.0062689781188965 0.0041470527648926
Output for 5.6.8
0.0063469409942627 0.0043148994445801
Output for 5.6.7
0.0053880214691162 0.0038089752197266
Output for 5.6.6
0.0073668956756592 0.0041358470916748
Output for 5.6.5
0.0052890777587891 0.0035219192504883
Output for 5.6.4
0.0050630569458008 0.0036780834197998
Output for 5.6.3
0.0064549446105957 0.0041670799255371
Output for 5.6.2
0.0057840347290039 0.0033149719238281
Output for 5.6.1
0.005946159362793 0.0040550231933594
Output for 5.6.0
0.0052947998046875 0.0035381317138672
Output for 5.5.38
0.006378173828125 0.0038518905639648
Output for 5.5.37
0.005856990814209 0.0037860870361328
Output for 5.5.36
0.0076189041137695 0.0035829544067383
Output for 5.5.35
0.0047969818115234 0.003230094909668
Output for 5.5.34
0.0054669380187988 0.0030779838562012
Output for 5.5.33
0.0067031383514404 0.0044879913330078
Output for 5.5.32
0.0066499710083008 0.0038478374481201
Output for 5.5.31
0.0058310031890869 0.0039081573486328
Output for 5.5.30
0.0044238567352295 0.0030179023742676
Output for 5.5.29
0.0052270889282227 0.0035049915313721
Output for 5.5.28
0.0063059329986572 0.0041489601135254
Output for 5.5.27
0.0044748783111572 0.0037529468536377
Output for 5.5.26
0.0050201416015625 0.0036690235137939
Output for 5.5.25
0.0064489841461182 0.0045120716094971
Output for 5.5.24
0.0050749778747559 0.0033791065216064
Output for 5.5.23
0.0044078826904297 0.0030269622802734
Output for 5.5.22
0.0049009323120117 0.0032699108123779
Output for 5.5.21
0.0061061382293701 0.0041308403015137
Output for 5.5.20
0.0052430629730225 0.0037589073181152
Output for 5.5.19
0.0054290294647217 0.0036730766296387
Output for 5.5.18
0.0062780380249023 0.0042920112609863
Output for 5.5.16
0.0066499710083008 0.0040028095245361
Output for 5.5.15
0.0054202079772949 0.0031139850616455
Output for 5.5.14
0.0054440498352051 0.003795862197876
Output for 5.5.13
0.0050289630889893 0.0031092166900635
Output for 5.5.12
0.0055549144744873 0.0036931037902832
Output for 5.5.11
0.007951021194458 0.0045571327209473
Output for 5.5.10
0.004817008972168 0.0032250881195068
Output for 5.5.9
0.0057239532470703 0.0037310123443604
Output for 5.5.8
0.006213903427124 0.003911018371582
Output for 5.5.7
0.0045201778411865 0.0030298233032227
Output for 5.5.6
0.0044291019439697 0.003054141998291
Output for 5.5.5
0.0047810077667236 0.0032308101654053
Output for 5.5.4
0.008328914642334 0.0048799514770508
Output for 5.5.3
0.0050151348114014 0.0034630298614502
Output for 5.5.2
0.0064799785614014 0.0044329166412354
Output for 5.5.1
0.0062119960784912 0.003917932510376
Output for 5.5.0
0.0058398246765137 0.0033800601959229
Output for 5.4.0 - 5.4.45
Parse error: syntax error, unexpected '$user' (T_VARIABLE) in /in/muhPX on line 9
Process exited with code 255.
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected T_VARIABLE in /in/muhPX on line 9
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_VARIABLE in /in/muhPX on line 9
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/muhPX on line 9
Process exited with code 255.