3v4l.org

run code in 300+ PHP versions simultaneously
<?php function nums() { $ary = [24,25,26,27,28,29,30,31,32]; foreach ( $ary as $x ) { $cmd = (yield $ary[$x]); // yield expr /*if ($cmd == 'stop') { echo 'Stopped and closed generator',"\n"; return; } } } $gen = nums(); foreach ($gen as $value) { echo "$value at iteration $times","\n"; if ($value == 28) { // don't let it past 28 $gen->send('stop'); } }

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.220.0150.04512.39
5.4.210.0120.04712.38
5.4.200.0200.03812.39
5.4.190.0160.04112.38
5.4.180.0200.04112.38
5.4.170.0320.08712.39
5.4.160.0140.04912.39
5.4.150.0160.04712.38
5.4.140.0160.04812.07
5.4.130.0150.05012.05
5.4.120.0150.04712.02
5.4.110.0170.04512.02
5.4.100.0170.04912.02
5.4.90.0160.04512.02
5.4.80.0130.04612.02
5.4.70.0300.05812.01
5.4.60.0160.04212.02
5.4.50.0140.04612.01
5.4.40.0180.04012.00
5.4.30.0150.04411.99
5.4.20.0180.04211.98
5.4.10.0150.04312.00
5.4.00.0170.04411.49
5.3.270.0190.04412.72
5.3.260.0270.09512.72
5.3.250.0200.04212.72
5.3.240.0170.04512.72
5.3.230.0210.05412.70
5.3.220.0120.04812.68
5.3.210.0160.04612.68
5.3.200.0170.05112.68
5.3.190.0400.08412.68
5.3.180.0140.04512.67
5.3.170.0170.04212.67
5.3.160.0170.04312.67
5.3.150.0140.04712.67
5.3.140.0140.04812.66
5.3.130.0190.04312.66
5.3.120.0270.06912.66
5.3.110.0150.04912.66
5.3.100.0130.04912.11
5.3.90.0160.04212.08
5.3.80.0190.05012.07
5.3.70.0190.04912.08
5.3.60.0190.04512.06
5.3.50.0160.04912.00
5.3.40.0130.04712.00
5.3.30.0160.04311.96
5.3.20.0160.04911.75
5.3.10.0180.04411.70
5.3.00.0390.08811.69

preferences:
138.55 ms | 1394 KiB | 7 Q