3v4l.org

run code in 300+ PHP versions simultaneously
<?php class FooBar implements Iterator { function __construct() { echo "Constructing new FooBar\n"; } function __destruct() { echo "Destructing FooBar\n"; } function current () { throw new Exception; } function key () { return 0; } function next () {} function rewind () {} function valid () { return true; } } function foo() { $f = new FooBar; yield from $f; } function bar() { echo "Starting bar()\n"; $x = foo(); try { var_dump($x->current()); } catch (Exception $e) { echo "Caught Exception\n"; } var_dump($x->current()); echo "Unsetting \$x\n"; unset($x); echo "Finishing bar()\n"; } bar();

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.0120.00318.30
8.3.60.0130.00316.75
8.3.50.0100.00522.06
8.3.40.0110.00418.92
8.3.30.0070.00718.47
8.3.20.0040.00420.46
8.3.10.0060.00323.48
8.3.00.0040.00419.85
8.2.180.0000.01418.36
8.2.170.0060.00922.96
8.2.160.0030.01020.46
8.2.150.0040.00424.18
8.2.140.0000.00924.66
8.2.130.0000.00821.02
8.2.120.0030.00526.35
8.2.110.0060.00319.45
8.2.100.0110.00017.91
8.2.90.0000.00819.20
8.2.80.0030.00517.97
8.2.70.0040.00417.63
8.2.60.0000.00917.93
8.2.50.0040.00418.07
8.2.40.0060.00321.02
8.2.30.0060.00320.69
8.2.20.0040.00417.82
8.2.10.0070.00017.98
8.2.00.0000.00818.08
8.1.280.0090.00925.92
8.1.270.0090.00620.29
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0090.00022.14
8.1.230.0080.00418.92
8.1.220.0000.00917.78
8.1.210.0040.00418.77
8.1.200.0030.00717.35
8.1.190.0030.00517.35
8.1.180.0030.00618.10
8.1.170.0000.00818.61
8.1.160.0000.00820.68
8.1.150.0030.00618.78
8.1.140.0040.00419.49
8.1.130.0000.00717.71
8.1.120.0000.00717.39
8.1.110.0050.00217.39
8.1.100.0030.00617.36
8.1.90.0000.00817.45
8.1.80.0040.00417.50
8.1.70.0000.00717.28
8.1.60.0000.00817.48
8.1.50.0030.00617.52
8.1.40.0030.00617.56
8.1.30.0030.00517.66
8.1.20.0000.00917.69
8.1.10.0000.00717.58
8.1.00.0040.00417.55
8.0.300.0000.00718.77
8.0.290.0040.00416.88
8.0.280.0030.00318.45
8.0.270.0020.00517.17
8.0.260.0000.00617.26
8.0.250.0000.00717.07
8.0.240.0030.00316.96
8.0.230.0070.00017.09
8.0.220.0030.00317.01
8.0.210.0070.00016.88
8.0.200.0000.00717.06
8.0.190.0030.00617.02
8.0.180.0000.00716.97
8.0.170.0000.00716.99
8.0.160.0040.00316.98
8.0.150.0040.00417.00
8.0.140.0000.00716.81
8.0.130.0030.00313.43
8.0.120.0070.00016.96
8.0.110.0040.00416.98
8.0.100.0040.00417.03
8.0.90.0080.00017.02
8.0.80.0040.01616.94
8.0.70.0000.00816.97
8.0.60.0040.00416.88
8.0.50.0070.00016.82
8.0.30.0130.00817.01
8.0.20.0110.01117.40
8.0.10.0030.00516.93
8.0.00.0110.00816.95
7.4.330.0000.00516.89
7.4.320.0000.00716.62
7.4.300.0030.00316.54
7.4.290.0070.00016.48
7.4.280.0050.00516.41
7.4.270.0000.00716.45
7.4.260.0040.00416.60
7.4.250.0000.00716.37
7.4.240.0020.00516.56
7.4.230.0000.00816.64
7.4.220.0130.00616.65
7.4.210.0110.00416.66
7.4.200.0000.00716.47
7.4.160.0110.00616.63
7.4.150.0120.00617.40
7.4.140.0100.01117.86
7.4.130.0030.01416.55
7.4.120.0100.01116.59
7.4.110.0120.00616.60
7.4.100.0100.01016.57
7.4.90.0060.01116.52
7.4.80.0090.00919.39
7.4.70.0130.00716.61
7.4.60.0130.00316.38
7.4.50.0060.00916.29
7.4.40.0130.00316.61
7.4.30.0080.00816.47
7.4.10.0050.01114.95
7.4.00.0080.00914.87
7.3.330.0030.00513.45
7.3.320.0000.00613.16
7.3.310.0070.00016.42
7.3.300.0030.00316.36
7.3.290.0050.01216.40
7.3.280.0120.00816.36
7.3.270.0070.01017.40
7.3.260.0100.00716.48
7.3.240.0090.00916.47
7.3.230.0150.00316.51
7.3.210.0060.01016.50
7.3.200.0030.01316.43
7.3.190.0050.01616.41
7.3.180.0060.00916.40
7.3.170.0140.00416.58
7.3.160.0080.00816.47
7.3.130.0050.01214.68
7.3.120.0090.00714.83
7.3.110.0080.01114.77
7.3.100.0070.00814.80
7.3.90.0070.00714.78
7.3.80.0070.00614.95
7.3.70.0030.01014.70
7.3.60.0040.01014.81
7.3.50.0080.00814.84
7.3.40.0010.01114.71
7.3.30.0060.00614.64
7.3.20.0060.00916.62
7.3.10.0040.00716.51
7.3.00.0030.01016.55
7.2.330.0080.01216.33
7.2.320.0060.01216.73
7.2.310.0060.01216.80
7.2.300.0100.00616.65
7.2.290.0090.01216.70
7.2.260.0050.01315.20
7.2.250.0060.01215.16
7.2.240.0090.00715.05
7.2.230.0070.00815.06
7.2.220.0040.01014.97
7.2.210.0120.00415.04
7.2.200.0070.00915.03
7.2.190.0070.00915.09
7.2.180.0010.01114.99
7.2.170.0030.01115.11
7.2.160.0070.01114.99
7.2.150.0050.00916.96
7.2.140.0050.01016.97
7.2.130.0030.00817.02
7.2.120.0090.00616.83
7.2.110.0030.00916.76
7.2.100.0040.00716.98
7.2.90.0050.00816.92
7.2.80.0060.00716.76
7.2.70.0050.00716.92
7.2.60.0060.00616.99
7.2.50.0040.01116.93
7.2.40.0050.00716.90
7.2.30.0030.00717.01
7.2.20.0090.00516.83
7.2.10.0060.00916.87
7.2.00.0050.00917.74
7.1.330.0030.01115.63
7.1.320.0020.01015.76
7.1.310.0080.00615.70
7.1.300.0060.01015.62
7.1.290.0080.00515.75
7.1.280.0060.00515.81
7.1.270.0070.00715.77
7.1.260.0060.00515.75
7.1.250.0070.00715.68
7.1.240.0090.00715.78
7.1.230.0050.00815.68
7.1.220.0070.00115.77
7.1.210.0070.00415.56
7.1.200.0060.00815.54
7.1.190.0070.00415.76
7.1.180.0050.01015.76
7.1.170.0070.00615.87
7.1.160.0050.00815.70
7.1.150.0050.00815.51
7.1.140.0070.00515.71
7.1.130.0130.00315.83
7.1.120.0040.01115.73
7.1.110.0050.00715.69
7.1.100.0050.00716.44
7.1.90.0080.00815.83
7.1.80.0050.00515.83
7.1.70.0060.00716.12
7.1.60.0050.00816.31
7.1.50.0060.01315.99
7.1.40.0060.00716.00
7.1.30.0080.00516.00
7.1.20.0040.01116.03
7.1.10.0040.00615.77
7.1.00.0040.00616.04
7.0.330.0000.01215.34
7.0.320.0060.00615.23
7.0.310.0040.00915.25
7.0.300.0050.00915.32
7.0.290.0080.00615.49
7.0.280.0050.00515.40
7.0.270.0060.00615.40
7.0.260.0080.00715.40
7.0.250.0060.00615.28
7.0.240.0000.01515.40
7.0.230.0040.01015.33
7.0.220.0050.00615.43
7.0.210.0050.00915.34
7.0.200.0070.00615.78
7.0.190.0040.01215.74
7.0.180.0040.00815.70
7.0.170.0050.00615.74
7.0.160.0060.00615.59
7.0.150.0080.00315.68
7.0.140.0030.00915.68
7.0.130.0020.00915.86
7.0.120.0050.00615.93
7.0.110.0010.00715.77
7.0.100.0030.00815.59
7.0.90.0080.00315.81
7.0.80.0060.00515.74
7.0.70.0060.00715.66
7.0.60.0070.00315.60
7.0.50.0020.00915.71
7.0.40.0040.00813.99
7.0.30.0020.00914.08
7.0.20.0040.00713.94
7.0.10.0040.00814.03
7.0.00.0050.00814.09
5.6.400.0060.00314.44
5.6.390.0080.00514.14
5.6.380.0100.00314.12
5.6.370.0090.00414.04
5.6.360.0090.00114.05
5.6.350.0050.00714.03
5.6.340.0050.01114.17
5.6.330.0050.01214.03
5.6.320.0050.00814.13
5.6.310.0020.01314.08
5.6.300.0050.01816.36
5.6.290.0040.01916.34
5.6.280.0050.01716.55
5.6.270.0050.02216.49
5.6.260.0050.02016.44
5.6.250.0060.01716.39
5.6.240.0060.01716.38
5.6.230.0030.02316.42
5.6.220.0110.01516.27
5.6.210.0040.01916.42
5.6.200.0020.02316.47
5.6.190.0030.02116.42
5.6.180.0050.01916.36
5.6.170.0050.01816.44
5.6.160.0110.01716.32
5.6.150.0030.02316.40
5.6.140.0060.03116.27
5.6.130.0040.01816.34
5.6.120.0090.02516.37
5.6.110.0030.02016.37
5.6.100.0050.01716.35
5.6.90.0060.02216.43
5.6.80.0080.01616.23
5.6.70.0060.02516.12
5.6.60.0070.02416.06
5.6.50.0060.01716.13
5.6.40.0080.01616.15
5.6.30.0020.02216.09
5.6.20.0060.01816.16
5.6.10.0070.01716.12
5.6.00.0060.02716.13
5.5.380.0060.02715.27
5.5.370.0060.01415.16
5.5.360.0020.02215.16
5.5.350.0010.02115.34
5.5.340.0050.01815.29
5.5.330.0050.02015.20
5.5.320.0050.01815.39
5.5.310.0060.02215.44
5.5.300.0020.02115.38
5.5.290.0040.01815.42
5.5.280.0090.02615.38
5.5.270.0040.01915.45
5.5.260.0080.02315.51
5.5.250.0070.01715.30
5.5.240.0070.01615.15
5.5.230.0070.02614.96
5.5.220.0100.01515.03
5.5.210.0040.02315.20
5.5.200.0030.02315.17
5.5.190.0050.02015.17
5.5.180.0050.01614.95
5.5.170.0060.00813.93
5.5.160.0060.01615.13
5.5.150.0040.01915.04
5.5.140.0040.01815.16
5.5.130.0020.02115.14
5.5.120.0050.01815.12
5.5.110.0030.02514.85
5.5.100.0080.02115.01
5.5.90.0060.02115.12
5.5.80.0070.02915.15
5.5.70.0040.02014.91
5.5.60.0040.01715.20
5.5.50.0090.01515.10
5.5.40.0050.01715.07
5.5.30.0030.01715.15
5.5.20.0070.01615.20
5.5.10.0070.01514.92
5.5.00.0030.03115.18

preferences:
63.66 ms | 401 KiB | 5 Q