3v4l.org

run code in 300+ PHP versions simultaneously
<?php function count_to_ten() { yield 1; yield 3 => 2; $cmd = ''; yield from [3, 4]; var_dump($cmd); if ($cmd == 't') { echo "close"; return false; } yield from new ArrayIterator([5, 6]); yield from seven_eight(); return yield from nine_ten(); } function seven_eight() { yield 7; yield from eight(); } function eight() { yield 8; } function nine_ten() { yield 9; return 10; } $gen = count_to_ten(); foreach ($gen as $k => $num) { echo "\n-$k -> $num \n"; echo $gen->send('t'); } var_dump( $gen->getReturn());

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)
8.3.60.0090.01516.63
8.3.50.0120.00316.48
8.3.40.0160.00318.67
8.3.30.0120.00318.62
8.3.20.0050.00220.22
8.3.10.0080.00023.70
8.3.00.0040.00417.63
8.2.180.0040.01116.75
8.2.170.0110.00722.96
8.2.160.0070.00720.35
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00421.03
8.2.120.0040.00426.35
8.2.110.0000.00919.27
8.2.100.0000.01217.97
8.2.90.0030.00519.03
8.2.80.0040.00418.03
8.2.70.0070.00317.50
8.2.60.0030.00518.04
8.2.50.0030.00518.10
8.2.40.0040.00422.16
8.2.30.0050.00320.92
8.2.20.0050.00317.96
8.2.10.0000.00718.13
8.2.00.0040.00418.05
8.1.280.0100.00725.92
8.1.270.0040.00423.67
8.1.260.0020.00526.35
8.1.250.0000.00728.09
8.1.240.0000.01022.20
8.1.230.0060.00617.42
8.1.220.0040.00417.79
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0040.00418.46
8.1.160.0040.00418.91
8.1.150.0040.00420.55
8.1.140.0060.00319.56
8.1.130.0070.00018.79
8.1.120.0000.00717.45
8.1.110.0000.01017.45
8.1.100.0070.00417.41
8.1.90.0050.00317.50
8.1.80.0040.00417.46
8.1.70.0040.00417.34
8.1.60.0000.00717.57
8.1.50.0000.00817.52
8.1.40.0040.00417.42
8.1.30.0040.00417.57
8.1.20.0000.00817.61
8.1.10.0080.00017.60
8.1.00.0000.00717.48
8.0.300.0040.00418.77
8.0.290.0000.00916.63
8.0.280.0040.00418.42
8.0.270.0100.00017.25
8.0.260.0080.00018.38
8.0.250.0000.00716.91
8.0.240.0040.00417.00
8.0.230.0000.00716.84
8.0.220.0030.00316.77
8.0.210.0040.00416.80
8.0.200.0030.00317.01
8.0.190.0080.00016.99
8.0.180.0040.00416.86
8.0.170.0000.00716.88
8.0.160.0040.00417.01
8.0.150.0070.00016.93
8.0.140.0030.00516.83
8.0.130.0030.00313.36
8.0.120.0040.00416.91
8.0.110.0000.00716.87
8.0.100.0040.00416.98
8.0.90.0000.00716.89
8.0.80.0040.01516.88
8.0.70.0030.00516.78
8.0.60.0070.00016.77
8.0.50.0040.00416.87
8.0.30.0080.01016.90
8.0.20.0080.01117.40
8.0.10.0000.00716.79
8.0.00.0030.01616.95
7.4.330.0050.00015.55
7.4.320.0030.00316.55
7.4.300.0030.00316.42
7.4.290.0030.00516.52
7.4.280.0080.00016.42
7.4.270.0000.00716.64
7.4.260.0000.00816.58
7.4.250.0060.00316.48
7.4.240.0040.00416.52
7.4.230.0050.00316.71
7.4.220.0160.00916.62
7.4.210.0040.01116.57
7.4.200.0050.00216.50
7.4.160.0080.01016.53
7.4.150.0030.01617.40
7.4.140.0090.01017.86
7.4.130.0070.01116.34
7.4.120.0080.01016.54
7.4.110.0070.01116.31
7.4.100.0030.01516.63
7.4.90.0150.00416.26
7.4.80.0100.00719.39
7.4.70.0030.01516.59
7.4.60.0030.01216.59
7.4.50.0030.01216.49
7.4.40.0130.01016.60
7.4.30.0160.00016.61
7.4.00.0070.01014.98
7.3.330.0050.00013.20
7.3.320.0000.00613.17
7.3.310.0030.00316.18
7.3.300.0000.00716.23
7.3.290.0080.00716.38
7.3.280.0060.01216.36
7.3.270.0090.00917.40
7.3.260.0220.01516.34
7.3.250.0100.00816.35
7.3.240.0050.01216.36
7.3.230.0170.00016.43
7.3.210.0080.00816.55
7.3.200.0100.01016.50
7.3.190.0140.00016.62
7.3.180.0080.00816.64
7.3.170.0030.01316.47
7.3.160.0100.00616.41
7.3.120.0030.01314.96
7.3.110.0180.00015.04
7.3.100.0090.00615.07
7.3.90.0030.00614.67
7.3.80.0030.01014.69
7.3.70.0080.00414.82
7.3.60.0080.00414.75
7.3.50.0000.01114.79
7.3.40.0040.00414.38
7.3.30.0060.00314.75
7.3.20.0080.00516.58
7.3.10.0030.00916.48
7.3.00.0060.00316.46
7.2.330.0100.01016.51
7.2.320.0030.01516.69
7.2.310.0060.01016.79
7.2.300.0120.00616.65
7.2.290.0100.00616.84
7.2.250.0060.01215.04
7.2.240.0100.00714.86
7.2.230.0000.00914.98
7.2.220.0000.01315.18
7.2.210.0080.00414.75
7.2.200.0040.01114.94
7.2.190.0100.00715.06
7.2.180.0040.01114.98
7.2.170.0080.00314.77
7.2.60.0060.00616.79
7.2.00.0100.00719.43
7.1.330.0090.00616.05
7.1.320.0060.00915.87
7.1.310.0050.00515.93
7.1.300.0040.00415.67
7.1.290.0090.00615.79
7.1.280.0060.00615.65
7.1.270.0100.00015.60
7.1.260.0000.01415.36
7.1.200.0130.00015.61
7.1.100.0040.00818.05
7.1.70.0100.00317.09
7.1.60.0190.01035.05
7.1.50.0210.01234.79
7.1.40.0160.02234.51
7.1.30.0170.01734.38
7.1.20.0190.01634.73
7.1.10.0070.01216.82
7.1.00.0060.01216.61
7.0.200.0030.01216.52
7.0.190.0050.01016.50
7.0.180.0080.00816.13
7.0.170.0030.01316.20
7.0.160.0020.01716.34
7.0.150.0070.01016.30
7.0.140.0070.00816.30
7.0.130.0070.01016.45
7.0.120.0030.01316.52
7.0.110.0060.00916.27
7.0.100.0000.01316.37
7.0.90.0070.01116.30
7.0.80.0050.00916.34
7.0.70.0000.01316.14
7.0.60.0060.00615.94
7.0.50.0030.01016.53
7.0.40.0000.01316.74
7.0.30.0060.00616.45
7.0.20.0030.01416.43
7.0.10.0100.00916.57
7.0.00.0030.01316.23

preferences:
102.62 ms | 401 KiB | 5 Q