3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** @return Generator */ function example() { for ($i = 0; $i < 5; $i += 1) { $answer = (yield $i * 2); echo "received: $answer\n"; } } $gen = example(); foreach ($gen as $x) { echo "sending $x\n"; $gen->send($x); }

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.70.0170.00318.43
8.3.60.0130.01018.43
8.3.50.0070.00716.22
8.3.40.0000.01418.70
8.3.30.0100.00318.72
8.3.20.0000.00721.63
8.3.10.0030.00623.72
8.3.00.0020.00521.25
8.2.190.0130.00316.58
8.2.180.0090.00616.33
8.2.170.0130.00618.61
8.2.160.0110.01122.96
8.2.150.0070.00025.66
8.2.140.0030.00624.66
8.2.130.0040.00426.16
8.2.120.0030.00619.77
8.2.110.0060.00321.05
8.2.100.0080.00417.91
8.2.90.0000.00819.34
8.2.80.0030.00617.97
8.2.70.0040.00418.05
8.2.60.0060.00317.63
8.2.50.0050.00318.22
8.2.40.0060.00320.52
8.2.30.0040.00419.59
8.2.20.0040.00418.09
8.2.10.0000.00717.72
8.2.00.0000.00717.99
8.1.280.0100.01025.92
8.1.270.0040.00423.97
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0050.00521.31
8.1.230.0070.00417.82
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0080.00017.35
8.1.190.0060.00317.38
8.1.180.0030.00518.10
8.1.170.0030.00618.61
8.1.160.0040.00418.80
8.1.150.0000.00720.11
8.1.140.0040.00417.63
8.1.130.0030.00318.91
8.1.120.0000.00717.45
8.1.110.0000.00917.39
8.1.100.0040.00417.33
8.1.90.0050.00217.34
8.1.80.0000.00917.45
8.1.70.0000.01017.40
8.1.60.0030.00517.54
8.1.50.0030.00517.54
8.1.40.0050.00317.42
8.1.30.0000.00717.68
8.1.20.0050.00317.62
8.1.10.0070.00017.39
8.1.00.0030.00617.46
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0030.00318.42
8.0.270.0060.00317.21
8.0.260.0000.00716.87
8.0.250.0070.00016.94
8.0.240.0000.00716.98
8.0.230.0000.00716.87
8.0.220.0030.00316.88
8.0.210.0040.00416.77
8.0.200.0000.00616.82
8.0.190.0040.00416.99
8.0.180.0070.00016.88
8.0.170.0000.00916.80
8.0.160.0000.00716.77
8.0.150.0070.00016.83
8.0.140.0000.00816.85
8.0.130.0000.00613.28
8.0.120.0040.00416.85
8.0.110.0040.00416.81
8.0.100.0040.00416.88
8.0.90.0000.00716.94
8.0.80.0060.01316.93
8.0.70.0000.00716.77
8.0.60.0000.00816.90
8.0.50.0030.00516.92
8.0.30.0090.00716.97
8.0.20.0070.01117.40
8.0.10.0040.00416.96
8.0.00.0110.00816.85
7.4.330.0000.00515.55
7.4.320.0030.00316.50
7.4.300.0000.00616.52
7.4.290.0030.00316.56
7.4.280.0050.00216.48
7.4.270.0050.00516.40
7.4.260.0000.00716.57
7.4.250.0030.00316.31
7.4.240.0070.00016.45
7.4.230.0000.00716.42
7.4.220.0040.00416.41
7.4.210.0070.01416.52
7.4.200.0000.00716.69
7.4.160.0080.00716.41
7.4.140.0120.00817.86
7.4.130.0090.00916.41
7.4.120.0110.00616.49
7.4.110.0100.00716.61
7.4.100.0070.01016.49
7.4.90.0100.01316.36
7.4.80.0190.00619.39
7.4.70.0030.01416.51
7.4.60.0160.00016.32
7.4.50.0030.01016.34
7.4.40.0070.01116.56
7.4.00.0080.00814.95
7.3.330.0020.00213.32
7.3.320.0000.00513.32
7.3.310.0000.00716.29
7.3.300.0060.00316.41
7.3.290.0080.00716.33
7.3.280.0060.01016.34
7.3.260.0100.00916.38
7.3.250.0100.00916.41
7.3.240.0120.00716.42
7.3.230.0120.00616.55
7.3.210.0040.01316.29
7.3.200.0170.00416.26
7.3.190.0100.00716.66
7.3.180.0130.00316.44
7.3.170.0030.01716.31
7.3.160.0160.00316.65
7.3.120.0040.01114.96
7.3.110.0090.00615.05
7.3.100.0100.00614.93
7.3.90.0030.01514.95
7.3.80.0100.00315.05
7.3.70.0040.00814.84
7.3.60.0060.01014.86
7.3.50.0040.01114.80
7.3.40.0040.00914.87
7.3.30.0090.00514.74
7.3.20.0050.00816.77
7.3.10.0060.00616.62
7.3.00.0110.00516.86
7.2.330.0130.00316.69
7.2.320.0040.01216.50
7.2.310.0140.00316.67
7.2.300.0000.01716.75
7.2.290.0110.01216.63
7.2.250.0120.00615.15
7.2.240.0130.00714.95
7.2.230.0100.01014.98
7.2.220.0060.00614.96
7.2.210.0110.00315.15
7.2.200.0110.00715.13
7.2.190.0000.01414.93
7.2.180.0030.01415.09
7.2.170.0050.00915.07
7.2.160.0060.00614.94
7.2.150.0110.01116.82
7.2.140.0120.01216.89
7.2.130.0100.00316.84
7.2.120.0030.01016.57
7.2.110.0090.00316.83
7.2.100.0130.00416.86
7.2.90.0160.00616.93
7.2.80.0080.00316.55
7.2.70.0150.00016.79
7.2.60.0130.00716.02
7.2.50.1980.01116.11
7.2.40.0440.01216.57
7.2.30.1060.01117.43
7.2.20.0340.01117.04
7.2.10.0430.01017.11
7.2.00.0250.01317.15
7.1.330.0000.01215.97
7.1.320.0040.00715.82
7.1.310.0030.01415.71
7.1.300.0110.00415.73
7.1.290.0040.00715.84
7.1.280.0040.00915.84
7.1.270.0060.00615.71
7.1.260.0090.00615.72
7.1.250.0040.00815.81
7.1.240.0130.01615.98
7.1.230.0120.00415.63
7.1.220.0060.01115.93
7.1.210.0150.00815.90
7.1.200.0090.01115.73
7.1.190.0110.01815.84
7.1.180.0100.01015.82
7.1.170.1270.01214.96
7.1.160.1840.01016.43
7.1.150.1290.01216.46
7.1.140.0360.01216.54
7.1.130.1350.01416.63
7.1.120.0760.01116.52
7.1.110.1310.01216.11
7.1.100.1300.01115.99
7.1.90.0480.01116.16
7.1.80.0390.00916.03
7.1.70.0990.01015.45
7.1.60.1370.01628.86
7.1.50.0840.01428.71
7.1.40.0460.01328.38
7.1.30.0510.01228.32
7.1.20.0440.01328.41
7.1.10.0690.01015.06
7.1.00.0620.00815.12
7.0.330.0190.00415.20
5.6.400.0090.01514.36
5.6.390.0200.00714.31
5.6.380.0120.00614.58

preferences:
18.04 ms | 401 KiB | 5 Q