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() { try { $f = new FooBar; yield from $f; } catch (Exception $e) { echo "[foo()] Caught Exception\n"; } } 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.60.0090.00618.31
8.3.50.0050.01322.10
8.3.40.0180.00018.79
8.3.30.0110.00318.88
8.3.20.0050.00320.20
8.3.10.0050.00323.69
8.3.00.0030.00519.85
8.2.180.0090.00925.92
8.2.170.0140.00722.96
8.2.160.0090.00922.08
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0060.00319.21
8.2.120.0080.00026.35
8.2.110.0040.00420.35
8.2.100.0040.00817.72
8.2.90.0080.00019.09
8.2.80.0030.00617.97
8.2.70.0050.00317.38
8.2.60.0030.00517.80
8.2.50.0090.00018.07
8.2.40.0000.00820.86
8.2.30.0060.00320.70
8.2.20.0050.00217.72
8.2.10.0000.00817.99
8.2.00.0080.00018.12
8.1.280.0110.00725.92
8.1.270.0140.00320.40
8.1.260.0000.00728.09
8.1.250.0040.00428.09
8.1.240.0060.00322.07
8.1.230.0040.00720.98
8.1.220.0000.00817.79
8.1.210.0030.00518.77
8.1.200.0060.00317.35
8.1.190.0040.00417.10
8.1.180.0040.00418.10
8.1.170.0030.00518.66
8.1.160.0000.00720.77
8.1.150.0000.00818.87
8.1.140.0040.00419.53
8.1.130.0040.00417.71
8.1.120.0070.00017.51
8.1.110.0000.00717.39
8.1.100.0040.00417.47
8.1.90.0040.00317.37
8.1.80.0040.00417.46
8.1.70.0000.00717.43
8.1.60.0080.00017.59
8.1.50.0090.00017.52
8.1.40.0040.00417.48
8.1.30.0030.00517.53
8.1.20.0050.00317.50
8.1.10.0080.00017.48
8.1.00.0060.00317.52
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0000.00718.46
8.0.270.0000.00717.40
8.0.260.0030.00317.27
8.0.250.0000.00717.09
8.0.240.0000.00817.08
8.0.230.0030.00316.93
8.0.220.0000.00717.01
8.0.210.0050.00216.90
8.0.200.0060.00017.05
8.0.190.0040.00417.01
8.0.180.0000.00717.00
8.0.170.0050.00316.89
8.0.160.0070.00016.95
8.0.150.0080.00016.93
8.0.140.0040.00416.91
8.0.130.0030.00313.40
8.0.120.0040.00416.99
8.0.110.0070.00016.93
8.0.100.0000.00716.80
8.0.90.0040.00416.82
8.0.80.0130.01016.86
8.0.70.0040.00416.94
8.0.60.0000.00916.88
8.0.50.0000.00816.93
8.0.30.0070.01016.93
8.0.20.0070.01217.40
8.0.10.0040.00417.13
8.0.00.0090.01016.69
7.4.330.0000.00516.76
7.4.320.0040.00416.63
7.4.300.0030.00316.66
7.4.290.0000.00716.44
7.4.280.0030.00616.58
7.4.270.0030.00316.52
7.4.260.0040.00416.46
7.4.250.0020.00516.56
7.4.240.0020.00616.56
7.4.230.0030.00316.70
7.4.220.0000.01916.63
7.4.210.0070.00716.50
7.4.200.0000.00716.61
7.4.160.0090.00616.54
7.4.150.0090.00917.40
7.4.140.0130.00617.86
7.4.130.0140.01016.59
7.4.120.0170.00516.61
7.4.110.0030.01616.70
7.4.100.0060.01116.62
7.4.90.0100.00616.46
7.4.80.0070.01319.39
7.4.70.0130.00316.53
7.4.60.0030.01416.55
7.4.50.0090.00616.48
7.4.40.0120.00316.59
7.4.30.0130.01016.64
7.4.00.0030.00914.66
7.3.330.0020.00413.20
7.3.320.0000.00513.32
7.3.310.0030.00316.53
7.3.300.0040.00416.45
7.3.290.0090.00716.36
7.3.280.0070.01016.39
7.3.270.0070.01017.40
7.3.260.0100.00716.34
7.3.240.0080.00816.50
7.3.230.0070.01016.56
7.3.210.0100.00616.62
7.3.200.0060.00916.49
7.3.190.0090.00816.48
7.3.180.0120.00316.34
7.3.170.0110.00816.68
7.3.160.0060.00916.60
7.3.00.0060.00916.39
7.2.330.0150.00316.43
7.2.320.0120.00616.73
7.2.310.0070.01016.65
7.2.300.0080.00816.78
7.2.290.0130.00916.86
7.2.130.0040.00816.79
7.2.120.0030.00916.67
7.2.110.0150.00416.62
7.2.100.0080.00316.75
7.2.90.0090.00616.81
7.2.80.0120.00316.99
7.2.70.0030.01217.01
7.2.60.0040.00916.91
7.2.50.0030.01616.68
7.2.40.0070.00316.98
7.2.30.0080.00816.86
7.2.20.0060.00917.06
7.2.10.0030.01017.00
7.2.00.0080.00718.07
7.1.250.0040.00415.90
7.1.240.0040.00815.55
7.1.230.0060.00915.70
7.1.220.0000.01215.66
7.1.210.0040.01115.79
7.1.200.0070.00415.79
7.1.190.0030.00615.64
7.1.180.0120.00015.70
7.1.170.0000.01015.48
7.1.160.0040.00715.80
7.1.150.0040.00815.52
7.1.140.0030.00615.79
7.1.130.0060.00615.75
7.1.120.0100.00315.63
7.1.110.0080.00315.73
7.1.100.0040.00816.91
7.1.90.0070.00415.74
7.1.80.0130.00015.73
7.1.70.0090.00316.25
7.1.60.0070.01017.38
7.1.50.0070.00916.29
7.1.40.0030.01015.52
7.1.30.0090.00615.71
7.1.20.0110.00615.77
7.1.10.0070.00315.44
7.1.00.0070.03918.95
7.0.330.0070.00315.25
7.0.320.0060.00315.54
7.0.310.0040.00415.12
7.0.300.0060.00615.21
7.0.290.0030.00615.44
7.0.280.0060.00615.20
7.0.270.0030.01015.21
7.0.260.0030.01015.16
7.0.250.0070.00315.60
7.0.240.0070.00415.08
7.0.230.0030.00715.30
7.0.220.0090.00015.48
7.0.210.0040.00415.16
7.0.200.0070.00415.87
7.0.190.0070.00715.46
7.0.180.0070.00715.04
7.0.170.0000.00915.38
7.0.160.0040.00715.25
7.0.150.0080.00315.40
7.0.140.0070.01015.31
7.0.130.0090.00415.24
7.0.120.0060.00315.20
7.0.110.0000.00915.40
7.0.100.0090.00315.26
7.0.90.0030.00715.43
7.0.80.0080.00015.54
7.0.70.0100.00015.41
7.0.60.0070.04517.70
7.0.50.0030.02516.61
7.0.40.0070.02216.73
7.0.30.0180.04216.79
7.0.20.0180.03616.80
7.0.10.0100.04316.73
7.0.00.0050.03716.74
5.6.380.0000.01014.07
5.6.370.0060.00314.00
5.6.360.0080.00414.38
5.6.350.0040.00714.13
5.6.340.0020.00614.13
5.6.330.0040.00714.28
5.6.320.0070.00713.90
5.6.310.0030.00714.03
5.6.300.0040.00413.90
5.6.290.0040.00714.27
5.6.280.0050.04017.49
5.6.270.0060.00614.00
5.6.260.0000.01014.12
5.6.250.0030.00913.99
5.6.240.0090.00314.06
5.6.230.0050.00514.09
5.6.220.0000.00914.10
5.6.210.0120.03817.21
5.6.200.0070.04016.23
5.6.190.0050.02317.32
5.6.180.1670.03417.28
5.6.170.0090.02417.54
5.6.160.0050.03217.31
5.6.150.0090.04216.15
5.6.140.0050.04516.14
5.6.130.0070.02216.16
5.6.120.0070.03617.65
5.6.110.0050.02317.58
5.6.100.0050.04317.62
5.6.90.0120.04017.48
5.6.80.0030.03817.25
5.6.70.0080.00414.07
5.6.60.0030.00913.77
5.6.50.0040.00714.16
5.6.40.0040.00814.15
5.6.30.0080.00313.84
5.6.20.0030.00613.95
5.6.10.0030.01013.81
5.6.00.0070.00714.18
5.5.380.0000.00810.91
5.5.370.0030.00710.90
5.5.360.0030.00610.90
5.5.350.0110.04115.63
5.5.340.0070.04214.42
5.5.330.0100.04115.74
5.5.320.0160.04115.72
5.5.310.0160.03515.65
5.5.300.0050.03514.53
5.5.290.0090.03314.42
5.5.280.0050.02415.79
5.5.270.0070.04015.88
5.5.260.0120.03815.95
5.5.250.0030.02115.74
5.5.240.0050.02015.49
5.5.230.0030.00310.90
5.5.220.0000.00710.90
5.5.210.0000.00810.90
5.5.200.0050.00210.94
5.5.190.0030.00610.92
5.5.180.0070.00410.90
5.5.170.0050.00210.90
5.5.160.0060.00311.02
5.5.150.0040.00810.90
5.5.140.0000.00810.90
5.5.130.0060.00010.90
5.5.120.0070.00010.90
5.5.110.0030.00310.90
5.5.100.0040.00410.90
5.5.90.0000.00710.90
5.5.80.0050.00210.90
5.5.70.0060.00611.01
5.5.60.0000.00810.93
5.5.50.0080.00010.90
5.5.40.0080.00010.90
5.5.30.0000.00910.90
5.5.20.0050.00310.98
5.5.10.0050.00510.90
5.5.00.0000.00810.90

preferences:
54.27 ms | 401 KiB | 5 Q