3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X { function __construct($id, $gen) { $this->id = $id; $this->gen = $gen; } function __destruct() { echo "__destruct $this->id\n"; var_dump($this->gen->current()); var_dump($this->gen->key()); echo "\n\n"; } } function make($id, $self) { return new X($id, $self); } function gen() { $self = yield (0); echo "After yield 0\n"; yield make('key', $self) => make('value', $self); echo "After yield X\n"; yield 12; } $a = gen(); var_dump($a->current()); $a->send($a); var_dump($a->current()); $a->next();

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.0100.00716.63
8.3.50.0120.00922.05
8.3.40.0110.00418.85
8.3.30.0130.00018.65
8.3.20.0070.00020.28
8.3.10.0070.00021.85
8.3.00.0060.00317.50
8.2.180.0170.00318.29
8.2.170.0100.00722.96
8.2.160.0100.00619.41
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0070.00026.16
8.2.120.0040.00419.89
8.2.110.0030.00722.10
8.2.100.0000.01117.91
8.2.90.0040.00417.90
8.2.80.0020.00517.97
8.2.70.0040.00417.50
8.2.60.0040.00417.93
8.2.50.0060.00318.07
8.2.40.0030.00618.03
8.2.30.0040.00419.92
8.2.20.0000.00717.65
8.2.10.0030.00318.07
8.2.00.0060.00318.05
8.1.280.0150.00325.92
8.1.270.0080.00023.79
8.1.260.0070.00026.35
8.1.250.0000.00828.09
8.1.240.0060.00322.19
8.1.230.0100.00020.88
8.1.220.0000.00717.74
8.1.210.0060.00319.03
8.1.200.0000.00817.36
8.1.190.0000.00717.23
8.1.180.0000.00818.10
8.1.170.0050.00518.59
8.1.160.0000.00718.80
8.1.150.0050.00218.67
8.1.140.0040.00419.63
8.1.130.0040.00417.48
8.1.120.0070.00017.55
8.1.110.0000.00717.48
8.1.100.0070.00017.39
8.1.90.0000.00717.53
8.1.80.0040.00417.46
8.1.70.0030.00317.37
8.1.60.0000.00717.55
8.1.50.0040.00417.62
8.1.40.0000.00717.48
8.1.30.0060.00317.61
8.1.20.0000.00717.63
8.1.10.0000.00817.57
8.1.00.0050.00217.47
8.0.300.0040.00419.85
8.0.290.0030.00316.58
8.0.280.0000.00718.34
8.0.270.0030.00317.21
8.0.260.0060.00316.82
8.0.250.0040.00416.96
8.0.240.0000.00616.88
8.0.230.0070.00016.95
8.0.220.0070.00016.79
8.0.210.0030.00316.85
8.0.200.0050.00516.95
8.0.190.0000.00716.80
8.0.180.0000.00716.86
8.0.170.0000.00716.73
8.0.160.0000.00816.79
8.0.150.0000.00716.75
8.0.140.0030.00316.86
8.0.130.0040.00413.33
8.0.120.0040.00416.82
8.0.110.0060.00316.73
8.0.100.0000.00716.96
8.0.90.0030.00316.82
8.0.80.0080.01516.78
8.0.70.0080.00016.81
8.0.60.0000.00716.66
8.0.50.0000.00716.84
8.0.30.0090.00916.91
8.0.20.0090.01017.40
8.0.10.0000.00716.85
8.0.00.0100.00716.80
7.4.330.0060.00015.08
7.4.320.0000.00716.54
7.4.300.0000.00716.41
7.4.290.0050.00316.59
7.4.280.0070.00016.52
7.4.270.0040.00416.57
7.4.260.0000.00716.59
7.4.250.0030.00316.34
7.4.240.0040.00316.47
7.4.230.0040.00416.62
7.4.220.0030.00316.54
7.4.210.0070.01016.58
7.4.200.0030.00316.64
7.4.160.0080.00816.54
7.4.150.0140.00317.40
7.4.140.0110.01017.86
7.4.130.0100.00916.42
7.4.120.0070.01116.52
7.4.110.0110.00816.57
7.4.100.0100.00716.36
7.4.90.0090.00916.57
7.4.80.0060.01219.39
7.4.70.0030.01316.41
7.4.60.0120.00316.50
7.4.50.0040.00416.24
7.4.40.0040.01116.21
7.4.30.0090.00916.53
7.4.00.0110.00714.88
7.3.330.0000.00613.18
7.3.320.0000.00513.32
7.3.310.0040.00416.31
7.3.300.0030.00316.22
7.3.290.0070.00016.20
7.3.280.0070.00916.17
7.3.270.0180.00017.40
7.3.260.0140.00716.53
7.3.250.0080.00916.34
7.3.240.0080.01016.33
7.3.230.0130.00716.39
7.3.210.0100.00716.50
7.3.200.0110.00616.62
7.3.190.0130.00316.31
7.3.180.0110.00516.54
7.3.170.0130.00316.27
7.3.160.0060.01616.27
7.3.120.0060.00914.88
7.3.110.0060.01214.77
7.3.100.0100.00714.96
7.3.90.0030.01014.50
7.3.80.0110.00014.49
7.3.70.0090.00314.81
7.3.60.0000.00914.88
7.3.50.0030.00714.84
7.3.40.0100.00314.77
7.3.30.0000.01314.66
7.3.20.0050.00516.59
7.3.10.0060.00616.59
7.3.00.0100.00316.69
7.2.330.0060.01316.83
7.2.320.0190.00016.72
7.2.310.0100.00716.63
7.2.300.0110.00716.69
7.2.290.0100.00716.70
7.2.250.0000.01514.87
7.2.240.0030.01715.17
7.2.230.0040.00815.19
7.2.220.0040.00715.29
7.2.210.0100.00315.24
7.2.200.0030.00914.89
7.2.190.0000.00915.13
7.2.180.0060.00914.78
7.2.170.0000.01615.07
7.2.160.0000.01315.24
7.2.150.0060.01217.02
7.2.140.0100.00317.01
7.2.130.0060.00616.79
7.2.120.0070.00717.02
7.2.110.0030.00916.91
7.2.100.0040.00717.10
7.2.90.0030.00617.13
7.2.80.0040.01116.89
7.2.70.0090.00617.08
7.2.60.0060.00717.00
7.2.50.0050.00817.12
7.2.40.0100.00016.71
7.2.30.0000.01217.10
7.2.20.0070.01016.95
7.2.10.0060.01016.84
7.2.00.0050.01018.07
7.1.330.0110.00415.64
7.1.320.0070.00316.02
7.1.310.0070.00715.61
7.1.300.0070.00415.82
7.1.290.0040.00715.82
7.1.280.0060.00615.76
7.1.270.0090.00315.71
7.1.260.0090.00615.70
7.1.250.0040.00815.51
7.1.200.0070.00715.53
7.1.100.0030.01017.88
7.1.70.0000.00817.17
7.1.60.0090.01319.43
7.1.50.0090.00316.90
7.1.00.0130.06322.41
7.0.200.0140.00714.66
7.0.60.0030.07019.98
7.0.50.0030.04717.85
7.0.40.0100.05019.99
7.0.30.0130.04319.83
7.0.20.0370.07019.72
7.0.10.0100.07719.91
7.0.00.0130.07719.80
5.6.280.0030.03020.92
5.6.210.0070.08320.70
5.6.200.0070.04018.29
5.6.190.0100.04020.64
5.6.180.3370.03720.51
5.6.170.0330.08320.73
5.6.160.0000.05320.54
5.6.150.0000.04318.16
5.6.140.0030.08018.14
5.6.130.0070.03718.15
5.6.120.0170.06321.05
5.6.110.0130.08021.14
5.6.100.0070.05720.99
5.6.90.0100.08321.03
5.6.80.0130.08720.52
5.5.350.0300.07020.42
5.5.340.0130.07318.02
5.5.330.0200.07320.31
5.5.320.0300.06320.31
5.5.310.0300.07320.30
5.5.300.0000.04717.94
5.5.290.0000.08717.99
5.5.280.0100.06020.88
5.5.270.0070.04020.80
5.5.260.0100.08020.90
5.5.250.0130.07720.78
5.5.240.0070.06720.29
5.4.450.0200.09019.16
5.4.440.0330.06019.59
5.4.430.0700.07019.16
5.4.420.0630.06019.33
5.4.410.0770.08319.16
5.4.400.1030.05319.21
5.4.390.0200.06318.85
5.4.380.0230.04718.86
5.4.370.0200.05019.24
5.4.360.0470.06319.32
5.4.350.0430.05719.29
5.4.340.0770.06019.15
5.4.320.0200.05719.13
5.4.310.0200.06019.15
5.4.300.0270.04719.32
5.4.290.0200.05719.00
5.4.280.0030.06319.25
5.4.270.0670.07019.14
5.4.260.0500.06019.27
5.4.250.0700.04319.23
5.4.240.0330.07019.12
5.4.230.0070.06019.23
5.4.220.0800.07319.00
5.4.210.0130.08019.23
5.4.200.0170.07318.83
5.4.190.0470.05319.21
5.4.180.0230.05019.10
5.4.170.0100.06019.04
5.4.160.0130.05318.81
5.4.150.0170.05719.27
5.4.140.0130.08016.62
5.4.130.0170.06316.55
5.4.120.0230.05016.59
5.4.110.0170.05716.30
5.4.100.0230.04716.58
5.4.90.0230.05716.48
5.4.80.0330.05716.60
5.4.70.0200.07316.59
5.4.60.0300.06716.61
5.4.50.0200.05316.62
5.4.40.0330.05316.49
5.4.30.0230.05016.25
5.4.20.0230.05316.55
5.4.10.0070.06016.59
5.4.00.0270.04715.84

preferences:
55.09 ms | 401 KiB | 5 Q