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"; } 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.0040.01416.63
8.3.60.0090.00616.74
8.3.50.0110.00822.11
8.3.40.0120.00918.73
8.3.30.0110.00418.74
8.3.20.0040.00420.22
8.3.10.0000.00823.53
8.3.00.0000.00819.50
8.2.190.0090.00616.63
8.2.180.0120.00318.29
8.2.170.0040.01122.96
8.2.160.0070.00720.28
8.2.150.0030.00624.18
8.2.140.0080.00024.66
8.2.130.0070.00320.38
8.2.120.0060.00326.35
8.2.110.0030.00622.14
8.2.100.0130.00017.78
8.2.90.0050.00317.63
8.2.80.0040.00418.05
8.2.70.0080.00017.80
8.2.60.0060.00317.93
8.2.50.0000.00818.10
8.2.40.0050.00220.42
8.2.30.0040.00420.54
8.2.20.0060.00317.68
8.2.10.0040.00418.04
8.2.00.0000.00918.11
8.1.280.0060.00925.92
8.1.270.0080.00023.88
8.1.260.0070.00028.09
8.1.250.0040.00428.09
8.1.240.0030.00623.96
8.1.230.0060.00619.12
8.1.220.0030.00517.74
8.1.210.0000.00818.77
8.1.200.0000.00917.35
8.1.190.0030.00617.35
8.1.180.0090.00018.10
8.1.170.0060.00318.64
8.1.160.0040.00421.94
8.1.150.0050.00218.80
8.1.140.0050.00319.52
8.1.130.0040.00417.71
8.1.120.0040.00417.40
8.1.110.0030.00617.46
8.1.100.0090.00017.46
8.1.90.0080.00017.38
8.1.80.0060.00317.34
8.1.70.0000.00717.38
8.1.60.0100.00317.47
8.1.50.0000.00817.54
8.1.40.0060.00317.55
8.1.30.0040.00417.56
8.1.20.0000.00717.49
8.1.10.0000.00817.57
8.1.00.0090.00017.50
8.0.300.0040.00421.70
8.0.290.0050.00316.88
8.0.280.0040.00418.45
8.0.270.0030.00317.26
8.0.260.0030.00517.20
8.0.250.0030.00316.96
8.0.240.0000.00716.94
8.0.230.0000.00716.91
8.0.220.0030.00616.95
8.0.210.0000.00817.00
8.0.200.0060.00016.90
8.0.190.0080.00017.00
8.0.180.0050.00316.95
8.0.170.0040.00417.07
8.0.160.0030.00317.05
8.0.150.0070.00016.93
8.0.140.0040.00416.86
8.0.130.0030.00313.39
8.0.120.0040.00416.87
8.0.110.0050.00316.80
8.0.100.0040.00416.94
8.0.90.0000.00716.84
8.0.80.0100.00816.96
8.0.70.0060.00317.03
8.0.60.0050.00316.92
8.0.50.0080.00016.76
8.0.30.0070.01417.09
8.0.20.0110.00817.40
8.0.10.0000.00716.90
8.0.00.0110.00616.87
7.4.330.0000.00516.82
7.4.320.0050.00316.52
7.4.300.0030.00316.49
7.4.290.0000.00716.49
7.4.280.0030.00616.63
7.4.270.0030.00316.43
7.4.260.0030.00316.39
7.4.250.0070.00016.55
7.4.240.0050.00216.50
7.4.230.0050.00316.67
7.4.220.0100.00716.46
7.4.210.0070.01416.50
7.4.200.0040.00416.71
7.4.160.0120.00316.41
7.4.150.0060.01217.40
7.4.140.0160.00517.86
7.4.130.0060.01516.53
7.4.120.0090.01116.55
7.4.110.0130.01016.47
7.4.100.0060.01016.72
7.4.90.0140.01416.42
7.4.80.0120.00619.39
7.4.70.0060.01116.47
7.4.60.0070.01016.55
7.4.50.0110.00416.43
7.4.40.0130.00416.52
7.4.30.0160.00816.48
7.4.10.0030.01416.64
7.4.00.0060.01215.59
7.3.330.0050.00013.32
7.3.320.0050.00013.45
7.3.310.0000.00716.38
7.3.300.0030.00316.33
7.3.290.0080.00816.42
7.3.280.0100.00916.35
7.3.270.0120.00617.40
7.3.260.0070.01016.57
7.3.250.0070.01116.49
7.3.240.0120.00616.53
7.3.230.0060.01416.47
7.3.210.0030.01316.53
7.3.200.0070.01016.32
7.3.190.0110.00516.57
7.3.180.0130.00616.30
7.3.170.0180.00316.50
7.3.160.0090.01216.54
7.3.130.0090.00916.40
7.3.120.0100.00815.51
7.3.110.0100.00515.70
7.3.100.0080.00515.69
7.3.90.0050.00915.71
7.3.80.0120.00515.73
7.3.70.0080.00615.71
7.3.60.0100.00315.66
7.3.50.0030.00815.65
7.3.40.0030.01115.68
7.3.30.0020.01015.67
7.3.20.0050.00717.50
7.3.10.0030.01017.35
7.3.00.0050.00717.36
7.2.330.0040.01316.87
7.2.320.0070.01016.80
7.2.310.0030.01316.72
7.2.300.0150.00416.76
7.2.290.0180.00516.78
7.2.260.0090.01016.51
7.2.250.0050.01515.94
7.2.240.0020.01715.74
7.2.230.0060.00815.75
7.2.220.0030.01315.75
7.2.210.0050.01115.83
7.2.200.0070.00515.75
7.2.190.0090.00415.80
7.2.180.0030.00915.77
7.2.170.0100.00315.92
7.2.160.0060.00616.62
7.2.150.0030.00718.30
7.2.140.0040.00818.38
7.2.130.0070.00718.29
7.2.120.0100.00318.44
7.2.110.0030.01318.39
7.2.100.0030.01318.44
7.2.90.0100.00318.35
7.2.80.0040.00818.19
7.2.70.0030.01318.41
7.2.60.0030.01017.67
7.2.50.0060.00618.52
7.2.40.0060.01018.43
7.2.30.0060.01018.55
7.2.20.0070.00318.35
7.2.10.0030.00718.38
7.2.00.0050.01218.85
7.1.330.0090.00516.59
7.1.320.0020.01116.46
7.1.310.0030.01216.60
7.1.300.0030.00716.42
7.1.290.0020.01216.32
7.1.280.0060.00816.41
7.1.270.0060.00616.48
7.1.260.0060.00716.56
7.1.250.0120.00017.16
7.1.240.0100.00317.23
7.1.230.0000.01017.25
7.1.220.0040.00817.28
7.1.210.0060.00617.17
7.1.200.0030.00916.44
7.1.190.0100.00717.18
7.1.180.0100.00617.21
7.1.170.0120.00317.17
7.1.160.0070.00717.36
7.1.150.0070.00717.28
7.1.140.0030.01017.14
7.1.130.0030.01017.17
7.1.120.0060.00317.26
7.1.110.0030.00717.33
7.1.100.0060.00517.58
7.1.90.0030.00717.33
7.1.80.0040.01217.28
7.1.70.0070.00617.18
7.1.60.0070.01318.31
7.1.50.0080.00816.87
7.1.40.0100.00317.13
7.1.30.0040.00817.34
7.1.20.0000.01517.21
7.1.10.0030.01317.36
7.1.00.0030.04219.69
7.0.330.0030.00616.99
7.0.320.0060.00616.93
7.0.310.0060.00716.92
7.0.300.0070.00717.09
7.0.290.0060.00616.94
7.0.280.0070.00717.01
7.0.270.0030.01016.87
7.0.260.0030.00716.97
7.0.250.0090.00617.25
7.0.240.0080.00517.10
7.0.230.0070.00717.05
7.0.220.0030.00716.86
7.0.210.0070.00717.01
7.0.200.0050.00616.83
7.0.190.0070.00316.99
7.0.180.0030.01016.95
7.0.170.0040.01117.06
7.0.160.0070.00716.96
7.0.150.0110.00016.94
7.0.140.0070.00716.80
7.0.130.0000.01117.09
7.0.120.0080.00617.10
7.0.110.0060.00617.11
7.0.100.0030.00616.95
7.0.90.0000.00917.05
7.0.80.0030.01317.18
7.0.70.0030.01016.88
7.0.60.0030.04818.44
7.0.50.0090.02017.43
7.0.40.0090.02317.66
7.0.30.0220.04017.54
7.0.20.0190.02417.52
7.0.10.0050.04717.61
7.0.00.0100.02217.56
5.6.400.0090.00615.83
5.6.390.0100.00315.67
5.6.380.0040.01115.57
5.6.370.0060.00615.61
5.6.360.0030.00615.79
5.6.350.0090.00615.63
5.6.340.0000.01215.64
5.6.330.0030.01015.45
5.6.320.0090.00615.40
5.6.310.0130.00315.52
5.6.300.0060.00315.40
5.6.290.0030.00715.74
5.6.280.0030.02818.23
5.6.270.0070.01115.71
5.6.260.0040.00715.69
5.6.250.0100.00315.67
5.6.240.0060.00615.67
5.6.230.0030.00715.83
5.6.220.0080.00315.70
5.6.210.0080.03218.20
5.6.200.0070.03216.81
5.6.190.0060.02818.10
5.6.180.0320.03718.19
5.6.170.0170.02018.11
5.6.160.0030.04018.12
5.6.150.0070.04917.00
5.6.140.0110.02216.89
5.6.130.0030.04716.82
5.6.120.0080.04218.44
5.6.110.0020.02418.49
5.6.100.0070.04418.31
5.6.90.0050.03118.36
5.6.80.0050.04317.92
5.6.70.0060.00915.59
5.6.60.0080.01115.59
5.6.50.0040.01115.65
5.6.40.0100.00715.59
5.6.30.0030.01015.54
5.6.20.0030.00715.50
5.6.10.0100.00715.53
5.6.00.0070.00715.50
5.5.380.0060.00315.51
5.5.370.0100.00315.49
5.5.360.0030.01315.64
5.5.350.0170.03718.05
5.5.340.0070.03916.71
5.5.330.0080.03617.99
5.5.320.0080.02517.97
5.5.310.0160.04118.04
5.5.300.0090.02416.70
5.5.290.0050.04316.73
5.5.280.0080.04018.15
5.5.270.0000.02618.28
5.5.260.0050.04518.26
5.5.250.0050.04118.13
5.5.240.0180.03817.93
5.5.230.0030.00615.46
5.5.220.0030.00615.46
5.5.210.0070.01115.61
5.5.200.0050.00515.57
5.5.190.0030.01015.40
5.5.180.0070.00715.54
5.5.170.0090.00015.59
5.5.160.0060.00615.63
5.5.150.0080.00315.42
5.5.140.0070.01115.50
5.5.130.0060.00315.49
5.5.120.0060.00615.35
5.5.110.0030.00915.61
5.5.100.0060.00915.32
5.5.90.0070.00315.57
5.5.80.0090.00615.66
5.5.70.0100.00315.37
5.5.60.0100.00315.19
5.5.50.0100.00315.27
5.5.40.0070.00715.40
5.5.30.0120.00615.41
5.5.20.0060.00915.39
5.5.10.0070.01015.56
5.5.00.0160.00015.30

preferences:
47.91 ms | 401 KiB | 5 Q