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 gen() { $self = yield (0); echo "After yield 0\n"; yield new X('key', $self) => new X('value', $self); echo "After yield X\n"; yield 12; } $a = gen(); $a->next(); 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.0170.00316.75
8.3.50.0110.00821.99
8.3.40.0160.00318.86
8.3.30.0070.00718.84
8.3.20.0040.00420.33
8.3.10.0050.00323.63
8.3.00.0070.00319.50
8.2.180.0100.00725.92
8.2.170.0180.00422.96
8.2.160.0100.00719.14
8.2.150.0050.00324.18
8.2.140.0030.00524.66
8.2.130.0000.00726.16
8.2.120.0060.00317.75
8.2.110.0110.00022.11
8.2.100.0090.00318.04
8.2.90.0000.00919.06
8.2.80.0060.00317.97
8.2.70.0040.00417.75
8.2.60.0000.00817.93
8.2.50.0000.00818.07
8.2.40.0000.00819.38
8.2.30.0040.00420.59
8.2.20.0040.00417.76
8.2.10.0000.00818.08
8.2.00.0100.00018.13
8.1.280.0140.00325.92
8.1.270.0030.00623.83
8.1.260.0000.00826.35
8.1.250.0000.00928.09
8.1.240.0030.00620.80
8.1.230.0150.00017.64
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0000.01117.22
8.1.190.0040.00417.22
8.1.180.0050.00318.10
8.1.170.0050.00318.96
8.1.160.0050.00221.91
8.1.150.0070.00018.86
8.1.140.0050.00319.53
8.1.130.0070.00017.67
8.1.120.0070.00017.47
8.1.110.0030.00517.42
8.1.100.0000.00717.43
8.1.90.0060.00317.48
8.1.80.0050.00317.40
8.1.70.0000.00817.39
8.1.60.0040.00417.63
8.1.50.0030.00617.43
8.1.40.0030.00517.52
8.1.30.0080.00317.55
8.1.20.0080.00017.69
8.1.10.0040.00417.47
8.1.00.0030.00617.48
8.0.300.0000.00718.77
8.0.290.0080.00016.75
8.0.280.0000.00718.43
8.0.270.0000.01017.28
8.0.260.0060.00017.29
8.0.250.0030.00616.98
8.0.240.0000.00717.08
8.0.230.0050.00216.94
8.0.220.0000.00716.97
8.0.210.0050.00316.99
8.0.200.0030.00317.09
8.0.190.0030.00617.05
8.0.180.0000.00816.97
8.0.170.0000.00816.96
8.0.160.0070.00017.02
8.0.150.0040.00416.97
8.0.140.0000.00716.93
8.0.130.0000.00713.49
8.0.120.0000.00816.96
8.0.110.0040.00417.05
8.0.100.0040.00416.97
8.0.90.0040.00417.02
8.0.80.0070.00717.02
8.0.70.0030.00517.00
8.0.60.0050.00316.91
8.0.50.0000.00717.02
8.0.30.0090.00917.16
8.0.20.0130.00517.40
8.0.10.0000.00817.08
8.0.00.0120.00616.96
7.4.330.0050.00015.08
7.4.320.0030.00316.45
7.4.300.0030.00316.57
7.4.290.0070.00016.63
7.4.280.0080.00016.52
7.4.270.0040.00416.64
7.4.260.0040.00416.66
7.4.250.0040.00416.61
7.4.240.0040.00416.58
7.4.230.0070.00016.42
7.4.220.0180.00716.65
7.4.210.0070.00716.56
7.4.200.0070.00016.52
7.4.160.0050.01116.68
7.4.150.0100.00817.40
7.4.140.0100.00917.86
7.4.130.0100.00916.62
7.4.120.0120.01116.53
7.4.110.0220.00316.72
7.4.100.0060.01216.47
7.4.90.0100.00716.67
7.4.80.0030.01519.39
7.4.70.0080.00816.46
7.4.60.0130.00716.47
7.4.50.0040.00416.39
7.4.40.0120.00616.72
7.4.30.0060.01216.56
7.4.00.0060.01214.89
7.3.330.0050.00013.40
7.3.320.0060.00013.36
7.3.310.0050.00216.45
7.3.300.0070.00016.42
7.3.290.0030.00316.22
7.3.280.0080.01016.39
7.3.270.0090.00917.40
7.3.260.0140.00316.70
7.3.250.0120.00516.52
7.3.240.0090.01316.41
7.3.230.0080.01416.44
7.3.210.0070.01016.40
7.3.200.0110.00516.45
7.3.190.0100.00716.52
7.3.180.0070.01016.50
7.3.170.0140.00416.70
7.3.160.0090.00616.53
7.3.120.0050.01214.91
7.3.110.0110.00714.91
7.3.100.0030.01415.09
7.3.90.0030.01014.99
7.3.80.0030.00714.65
7.3.70.0030.00714.64
7.3.60.0000.01214.97
7.3.50.0040.00814.74
7.3.40.0070.00714.82
7.3.30.0030.00914.86
7.3.20.0070.01016.68
7.3.10.0000.00916.61
7.3.00.0030.00716.74
7.2.330.0030.01416.81
7.2.320.0090.00916.71
7.2.310.0100.00716.70
7.2.300.0140.00316.74
7.2.290.0100.00716.71
7.2.250.0100.01015.22
7.2.240.0080.01215.09
7.2.230.0040.01415.14
7.2.220.0000.01415.27
7.2.210.0060.00315.36
7.2.200.0040.00814.91
7.2.190.0030.01015.09
7.2.180.0070.00315.03
7.2.170.0000.00915.13
7.2.160.0090.00614.84
7.2.150.0070.01116.92
7.2.140.0060.00616.64
7.2.130.0070.00716.77
7.2.120.0060.01216.76
7.2.110.0040.01117.03
7.2.100.0070.00716.99
7.2.90.0060.00917.04
7.2.80.0150.00316.96
7.2.70.0030.01316.89
7.2.60.0030.01216.90
7.2.50.0060.00917.03
7.2.40.0090.00317.07
7.2.30.0070.00316.97
7.2.20.0000.01016.94
7.2.10.0130.00316.71
7.2.00.0090.00418.12
7.1.330.0060.01015.87
7.1.320.0090.00615.84
7.1.310.0100.00315.69
7.1.300.0060.00615.56
7.1.290.0000.01015.77
7.1.280.0060.00615.70
7.1.270.0060.00615.56
7.1.260.0100.00315.77
7.1.250.0100.00715.52
7.1.240.0060.00315.99
7.1.230.0000.00915.88
7.1.220.0060.00615.87
7.1.210.0030.01115.80
7.1.200.0080.00715.53
7.1.190.0060.00615.92
7.1.180.0040.01115.72
7.1.170.0040.00715.84
7.1.160.0040.00815.82
7.1.150.0030.01015.86
7.1.140.0060.00615.83
7.1.130.0050.00315.80
7.1.120.0100.00015.56
7.1.110.0120.00315.82
7.1.100.0040.00816.89
7.1.90.0040.00715.84
7.1.80.0040.00415.78
7.1.70.0050.00516.25
7.1.60.0070.01217.54
7.1.50.0070.00916.45
7.1.40.0090.00015.83
7.1.30.0040.00715.62
7.1.20.0060.00315.58
7.1.10.0030.01215.54
7.1.00.0060.03819.15
7.0.330.0100.00315.54
7.0.320.0060.00315.50
7.0.310.0080.00415.57
7.0.300.0030.00915.32
7.0.290.0070.01015.40
7.0.280.0070.00315.24
7.0.270.0040.00715.26
7.0.260.0090.00315.62
7.0.250.0100.00315.39
7.0.240.0090.00315.55
7.0.230.0100.00315.32
7.0.220.0070.00715.39
7.0.210.0070.00715.58
7.0.200.0330.00515.08
7.0.190.0060.00315.21
7.0.180.0000.01215.25
7.0.170.0100.00315.45
7.0.160.0070.00415.50
7.0.150.0100.00315.58
7.0.140.0000.01115.38
7.0.130.0070.00715.43
7.0.120.0030.01015.34
7.0.110.0030.00515.43
7.0.100.0030.00715.38
7.0.90.0030.00915.47
7.0.80.0140.00015.38
7.0.70.0000.01015.46
7.0.60.0070.04317.63
7.0.50.0110.03516.61
7.0.40.0040.04916.66
7.0.30.0180.02516.74
7.0.20.0180.04016.72
7.0.10.0070.04716.90
7.0.00.0050.03316.83
5.6.400.0070.00314.02
5.6.390.0100.00014.29
5.6.380.0040.00814.10
5.6.370.0180.00014.41
5.6.360.0080.00014.52
5.6.350.0000.01614.35
5.6.340.0030.00914.16
5.6.330.0100.00614.09
5.6.320.0030.00614.40
5.6.310.0070.00314.05
5.6.300.0030.01413.95
5.6.290.0060.00614.52
5.6.280.0060.03817.55
5.6.270.0030.01314.43
5.6.260.0050.00314.19
5.6.250.0030.01014.11
5.6.240.0000.01214.17
5.6.230.0090.00613.91
5.6.220.0120.00013.95
5.6.210.0120.03717.31
5.6.200.0030.03316.13
5.6.190.0050.04517.21
5.6.180.1810.02517.30
5.6.170.0200.04017.37
5.6.160.0080.03117.33
5.6.150.0070.02016.30
5.6.140.0050.04216.20
5.6.130.0050.02316.10
5.6.120.0090.03517.47
5.6.110.0070.04317.64
5.6.100.0030.04117.73
5.6.90.0070.03817.54
5.6.80.0070.03117.22
5.6.70.0000.01314.18
5.6.60.0030.00714.04
5.6.50.0040.00714.00
5.6.40.0070.01014.04
5.6.30.0060.00614.14
5.6.20.0040.00714.06
5.6.10.0070.00714.12
5.6.00.0040.00814.09
5.5.380.0040.01113.98
5.5.370.0030.00714.28
5.5.360.0030.00714.00
5.5.350.0240.03717.19
5.5.340.0000.03715.96
5.5.330.0080.02717.37
5.5.320.0140.02617.10
5.5.310.0150.04317.18
5.5.300.0050.04315.95
5.5.290.0100.03316.01
5.5.280.0120.04017.48
5.5.270.0070.02317.31
5.5.260.0030.04817.38
5.5.250.0070.03017.30
5.5.240.0050.02216.98
5.5.230.0000.00814.00
5.5.220.0000.00914.00
5.5.210.0070.01014.15
5.5.200.0130.00314.20
5.5.190.0090.00314.00
5.5.180.0070.00713.99
5.5.170.0100.00314.12
5.5.160.0080.00013.98
5.5.150.0040.00813.94
5.5.140.0080.00813.95
5.5.130.0090.00313.57
5.5.120.0070.00313.89
5.5.110.0040.00714.12
5.5.100.0100.00314.18
5.5.90.0060.00813.89
5.5.80.0060.00614.20
5.5.70.0040.00714.09
5.5.60.0030.00613.91
5.5.50.0040.00413.86
5.5.40.0000.01013.82
5.5.30.0090.00314.00
5.5.20.0070.00714.14
5.5.10.0070.01013.74
5.5.00.0030.01013.54
5.4.450.0310.03814.95
5.4.440.0150.03215.01
5.4.430.0370.03214.86
5.4.420.0130.03314.97
5.4.410.0170.03715.09
5.4.400.0130.02815.01
5.4.390.0170.03514.81
5.4.380.0070.03414.75
5.4.370.0170.03214.83
5.4.360.0120.03514.82
5.4.350.0100.04114.75
5.4.340.0110.03014.75
5.4.330.0080.00410.93
5.4.320.0130.02714.80
5.4.310.0100.02714.83
5.4.300.0380.02614.71
5.4.290.0130.02714.86
5.4.280.0080.03414.71
5.4.270.0070.03115.00
5.4.260.0070.03214.87
5.4.250.0110.03915.01
5.4.240.0130.03014.92
5.4.230.0180.02714.93
5.4.220.0120.03114.91
5.4.210.0150.02914.74
5.4.200.0120.03014.92
5.4.190.0090.03214.97
5.4.180.0070.03214.96
5.4.170.0430.03314.82
5.4.160.0400.02514.87
5.4.150.0400.03615.02
5.4.140.0170.02313.61
5.4.130.0140.02713.50
5.4.120.0160.02313.48
5.4.110.0100.03513.69
5.4.100.0150.03813.55
5.4.90.0070.02713.69
5.4.80.0080.02813.63
5.4.70.0100.02713.48
5.4.60.0100.03013.63
5.4.50.0170.02413.54
5.4.40.0100.03313.67
5.4.30.0120.02513.76
5.4.20.0210.03013.71
5.4.10.0280.03713.75
5.4.00.0320.03813.33

preferences:
58.85 ms | 401 KiB | 5 Q