3v4l.org

run code in 300+ PHP versions simultaneously
<?php $depth = 0; spl_autoload_register(function ($class) use (&$depth) { $depth++; $indent = str_repeat('| ', $depth); echo $indent."$depth: $class\n"; if ($class == 'IFace') { interface IFace {} } elseif ($class == 'IFaceImplementor') { class IFaceImplementor implements IFace {} } elseif ($class == 'InterfaceOfMainParent') { interface InterfaceOfMainParent { public function methodForSecondaryLspCheck(): IFace; } } elseif ($class == 'MainParent') { abstract class MainParent implements InterfaceOfMainParent { public function methodForSecondaryLspCheck(): IFaceImplementor {} } } elseif ($class == 'Intermediate') { abstract class Intermediate extends MainParent {} } elseif ($class == 'Child1') { class Child1 extends Intermediate {} } elseif ($class == 'Child2') { class Child2 extends Intermediate {} } elseif ($class == 'EntrypointParent') { abstract class EntrypointParent { abstract public function methodForLspCheck1(): MainParent; abstract public function methodForLspCheck2(): MainParent; } } elseif ($class == 'Entrypoint') { class Entrypoint extends EntrypointParent { public function methodForLspCheck1(): Child1 {} public function methodForLspCheck2(): Child2 {} } } $depth--; }); class_exists(Entrypoint::class);

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.4.130.0110.01117.69
8.4.120.0360.01317.60
8.4.110.0290.00818.00
8.4.100.0340.01017.82
8.4.90.0450.00717.94
8.4.80.0390.00817.85
8.4.70.0370.00818.25
8.4.60.0370.00817.82
8.4.50.0510.00617.91
8.4.40.0460.01117.80
8.4.30.0270.01017.64
8.4.20.0250.00317.92
8.4.10.0230.00417.91
8.3.260.0160.00616.65
8.3.250.0280.00816.84
8.3.240.0420.00916.71
8.3.230.0350.01116.76
8.3.220.0440.01116.61
8.3.210.0380.00916.81
8.3.200.0270.00516.57
8.3.190.0050.00516.78
8.3.180.0420.00716.83
8.3.170.0420.00916.47
8.3.160.0380.00916.49
8.3.150.0420.00416.95
8.3.140.0170.00616.76
8.3.130.0170.00416.57
8.3.120.0210.00816.80
8.3.110.0380.00616.45
8.3.100.0510.00716.64
8.3.90.0430.00916.89
8.3.80.0400.01116.58
8.3.70.0440.00816.57
8.3.60.0410.01116.24
8.3.50.0500.00916.53
8.3.40.0440.00517.51
8.3.30.0240.00217.86
8.3.20.0230.00217.77
8.3.10.0300.00717.21
8.3.00.0180.00417.69
8.2.290.0120.00616.66
8.2.280.0170.00216.81
8.2.270.0220.00216.55
8.2.260.0170.00216.66
8.2.250.0160.00416.66
8.2.240.0230.00716.66
8.2.230.0190.00516.50
8.2.220.0350.00616.63
8.2.210.0320.00716.57
8.2.200.0310.01316.50
8.2.190.0340.00816.88
8.2.180.0350.00717.03
8.2.170.0300.00917.81
8.2.160.0390.00717.61
8.2.150.0200.00717.69
8.2.140.0240.00817.48
8.2.130.0330.01117.60
8.2.120.0350.01017.71
8.2.110.0350.00317.60
8.2.100.0350.00717.75
8.2.90.0320.00917.79
8.2.80.0370.01017.69
8.2.70.0360.00717.62
8.2.60.0320.00817.66
8.2.50.0470.00417.61
8.2.40.0290.01217.44
8.2.30.0310.01017.58
8.2.20.0330.00817.54
8.2.10.0180.00717.54
8.2.00.0140.00517.79
8.1.330.0330.00716.31
8.1.320.0330.01115.72
8.1.310.0350.00715.90
8.1.300.0190.00716.36
8.1.290.0170.00916.04
8.1.280.0380.00716.06
8.1.270.0170.00717.44
8.1.260.0310.01017.29
8.1.250.0330.00817.47
8.1.240.0320.00917.16
8.1.230.0320.00817.38
8.1.220.0300.00717.46
8.1.210.0200.00617.39
8.1.200.0210.00417.43
8.1.190.0170.00517.24
8.1.180.0150.00217.30
8.1.170.0300.00917.18
8.1.160.0320.00717.41
8.1.150.0320.00817.29
8.1.140.0290.01117.02
8.1.130.0290.01117.04
8.1.120.0340.00617.32
8.1.110.0300.00617.11
8.1.100.0340.00617.48
8.1.90.0300.01017.47
8.1.80.0380.00817.45
8.1.70.0400.00717.38
8.1.60.0270.00917.57
8.1.50.0280.00817.44
8.1.40.0330.00617.48
8.1.30.0300.00917.33
8.1.20.0210.00317.50
8.1.10.0200.00117.46
8.1.00.0280.00917.20
8.0.300.0340.00716.50
8.0.290.0380.00716.53
8.0.280.0300.00916.69
8.0.270.0340.01016.48
8.0.260.0370.00416.49
8.0.250.0310.00816.74
8.0.240.0320.00816.71
8.0.230.0270.01116.65
8.0.220.0390.00516.49
8.0.210.0370.00616.63
8.0.200.0310.01016.50
8.0.190.0300.01016.68
8.0.180.0310.01116.53
8.0.170.0350.00816.57
8.0.160.0320.01016.63
8.0.150.0300.01016.56
8.0.140.0220.00416.68
8.0.130.0210.00816.43
8.0.120.0350.00616.55
8.0.110.0310.01416.67
8.0.100.0340.00916.54
8.0.90.0390.00316.54
8.0.80.0170.00516.60
8.0.70.0170.01016.54
8.0.60.0190.00516.69
8.0.50.0160.00416.36
8.0.30.0180.00116.68
8.0.20.0310.01116.74
8.0.10.0300.01116.51
8.0.00.0360.00616.86
7.4.330.0260.01216.31
7.4.320.0290.00816.30
7.4.300.0310.00616.18
7.4.290.0330.00916.31
7.4.280.0300.00716.34
7.4.270.0330.00416.27
7.4.260.0300.00716.23
7.4.250.0290.00816.18
7.4.240.0300.00716.29
7.4.230.0320.00616.14
7.4.220.0360.00516.35
7.4.210.0320.00916.33
7.4.200.0280.00616.43
7.4.190.0280.00916.41
7.4.180.0280.01116.44
7.4.160.0260.01116.33
7.4.150.0300.00516.34
7.4.140.0210.00416.47
7.4.130.0250.00816.15
7.4.120.0270.01016.18
7.4.110.0310.00516.21
7.4.100.0160.00716.19
7.4.90.0280.00815.97
7.4.80.0270.00816.33
7.4.70.0380.00416.13
7.4.60.0400.00616.15
7.4.50.0350.00416.03
7.4.40.0280.00316.28
7.4.30.0300.00616.23
7.4.20.0210.00616.41
7.4.10.0310.00616.20
7.4.00.0350.00616.21
7.3.330.0230.00815.93
7.3.320.0290.00716.30
7.3.310.0290.00916.07
7.3.300.0330.00516.03
7.3.290.0280.00916.34
7.3.280.0320.01116.19
7.3.270.0290.00716.36
7.3.260.0250.01216.09
7.3.250.0280.00816.13
7.3.240.0310.00516.06
7.3.230.0180.00816.37
7.3.220.0290.01216.00
7.3.210.0330.00516.11
7.3.200.0310.00716.11
7.3.190.0330.00616.16
7.3.180.0360.00415.89
7.3.170.0290.00915.84
7.3.160.0320.00716.00
7.3.150.0270.00916.21
7.3.140.0320.00816.13
7.3.130.0240.00916.08
7.3.120.0310.00616.11
7.3.110.0320.00516.28
7.3.100.0270.00916.08
7.3.90.0310.00516.21
7.3.80.0400.00616.15
7.3.70.0370.00516.09
7.3.60.0320.00415.99
7.3.50.0330.00415.82
7.3.40.0320.00416.09
7.3.30.0260.00816.11
7.3.20.0230.00316.34
7.3.10.0250.00915.98
7.3.00.0310.00515.99
7.2.340.0310.00716.46
7.2.330.0290.00816.10
7.2.320.0290.00816.18
7.2.310.0290.00816.23
7.2.300.0270.01016.09
7.2.290.0370.00716.38
7.2.280.0300.00716.26
7.2.270.0270.00616.31
7.2.260.0280.00916.22
7.2.250.0290.00816.32
7.2.240.0300.00716.22
7.2.230.0300.00616.15
7.2.220.0320.00716.25
7.2.210.0300.00716.02
7.2.200.0350.00316.53
7.2.190.0310.00416.48
7.2.180.0130.00316.35
7.2.170.0290.00716.25
7.2.160.0270.00816.70
7.2.150.0260.01016.20
7.2.140.0890.00416.27
7.2.130.0170.00916.34
7.2.120.0210.00616.54
7.2.110.0160.00316.44
7.2.100.0340.00516.51
7.2.90.0350.00316.53
7.2.80.0360.00716.41
7.2.70.0230.00616.22
7.2.60.0280.01016.41
7.2.50.0250.00216.48
7.2.40.0160.00416.50
7.2.30.0180.00216.59
7.2.20.0340.00516.48
7.2.10.0260.00516.53
7.2.00.0180.00216.64
7.1.330.0120.00515.59
7.1.320.0140.00315.52
7.1.310.0300.00715.52
7.1.300.0310.00515.35
7.1.290.0350.00615.50
7.1.280.0230.00815.57
7.1.270.0270.00815.30
7.1.260.0780.00515.29
7.1.250.0270.00815.45
7.1.240.0250.00615.52
7.1.230.0300.00515.59
7.1.220.0240.00815.45
7.1.210.0250.00715.60
7.1.200.0300.00615.19
7.1.190.0320.00915.25
7.1.180.0160.00115.45
7.1.170.0250.00715.42
7.1.160.0290.00515.13
7.1.150.0260.00715.29
7.1.140.0180.00415.27
7.1.130.0250.00815.12
7.1.120.0280.00315.32
7.1.110.0180.00515.39
7.1.100.0270.00715.14
7.1.90.0260.00815.17
7.1.80.0320.00615.35
7.1.70.0300.00614.96
7.1.60.0350.00915.39
7.1.50.0300.01115.14
7.1.40.0650.00415.21
7.1.30.0130.00415.42
7.1.20.0200.00414.98
7.1.10.0290.00415.08
7.1.00.0280.00715.40
7.0.330.0220.00815.08
7.0.320.0290.00514.84
7.0.310.0200.00614.83
7.0.300.0170.00615.00
7.0.290.0130.00315.00
7.0.280.0130.00314.88
7.0.270.0120.00414.92
7.0.260.0300.00315.11
7.0.250.0310.00515.20
7.0.240.0250.00715.25
7.0.230.0270.00815.39
7.0.220.0230.00515.29
7.0.210.0130.00215.25
7.0.200.0250.00715.19
7.0.190.0280.00615.01
7.0.180.0260.00815.26
7.0.170.0300.00415.12
7.0.160.0700.00515.05
7.0.150.0260.00815.03
7.0.140.0320.00514.91
7.0.130.0440.00514.98
7.0.120.0270.00515.23
7.0.110.0260.00814.96
7.0.100.0250.00915.09
7.0.90.0280.00514.89
7.0.80.0160.00615.09
7.0.70.0190.00514.64
7.0.60.0210.00815.08
7.0.50.0190.00814.74
7.0.40.0280.00414.97
7.0.30.0300.00414.95
7.0.20.0210.00915.05
7.0.10.0230.00515.15
7.0.00.0170.00415.11
5.6.400.0210.00515.20
5.6.390.0150.00615.48
5.6.380.0120.00215.59
5.6.370.0270.00415.48
5.6.360.0250.00515.59
5.6.350.0230.00815.59
5.6.340.0240.00615.44
5.6.330.0220.00815.35
5.6.320.0270.00515.26
5.6.310.0260.00715.45
5.6.300.0290.00815.33
5.6.290.0240.00815.29
5.6.280.0280.00815.31
5.6.270.0330.00115.39
5.6.260.0260.00315.13
5.6.250.0310.00615.30
5.6.240.0260.00615.31
5.6.230.0280.00815.53
5.6.220.0250.01015.66
5.6.210.0210.00815.46
5.6.200.0240.00815.67
5.6.190.0260.00415.73
5.6.180.0230.00815.57
5.6.170.0220.00515.62
5.6.160.0200.00615.51
5.6.150.0190.00815.75
5.6.140.0270.00615.40
5.6.130.0290.00415.34
5.6.120.0230.00715.61
5.6.110.0120.00215.30
5.6.100.0130.00115.37
5.6.90.0130.00215.69
5.6.80.0130.00215.35
5.6.70.0240.00615.37
5.6.60.0270.00515.51
5.6.50.0250.00715.25
5.6.40.0190.00915.33
5.6.30.0130.00415.55
5.6.20.0240.00715.50
5.6.10.0260.00415.36
5.6.00.0260.00515.26
5.5.380.0310.00415.48
5.5.370.0540.00215.50
5.5.360.0340.00615.29
5.5.350.0200.01015.40
5.5.340.0100.00515.32
5.5.330.0080.00715.33
5.5.320.0130.00215.28
5.5.310.0280.00415.39
5.5.300.0250.00615.41
5.5.290.0260.00415.38
5.5.280.0210.00715.02
5.5.270.0250.00915.27
5.5.260.0220.00915.42
5.5.250.0270.00415.40
5.5.240.0240.00715.27
5.5.230.0210.00715.47
5.5.220.0190.00615.51
5.5.210.0270.00415.27
5.5.200.0250.00615.15
5.5.190.0190.00715.09
5.5.180.0230.00715.23
5.5.170.0220.00815.35
5.5.160.0240.00715.38
5.5.150.0240.00615.32
5.5.140.0250.00515.20
5.5.130.0270.00414.91
5.5.120.0230.00615.09
5.5.110.0240.00615.29
5.5.100.0150.00315.22
5.5.90.0270.00515.15
5.5.80.0200.00515.13
5.5.70.0230.00515.45
5.5.60.0140.00515.43
5.5.50.0190.01115.39
5.5.40.0220.00515.52
5.5.30.0280.00315.41
5.5.20.0260.00415.29
5.5.10.0210.01015.27
5.5.00.0280.00415.38
5.4.450.0180.00614.24
5.4.440.0200.00514.24
5.4.430.0200.00414.24
5.4.420.0180.00614.24
5.4.410.0180.00414.24
5.4.400.0200.00514.24
5.4.390.0200.00714.24
5.4.380.0240.00614.24
5.4.370.0220.00214.24
5.4.360.0210.00414.24
5.4.350.0170.00714.24
5.4.340.0180.00714.24
5.4.330.0190.00714.24
5.4.320.0210.00414.24
5.4.310.0180.00714.24
5.4.300.0210.00314.24
5.4.290.0220.00314.24
5.4.280.0190.00414.24
5.4.270.0200.00514.24
5.4.260.0210.00414.24
5.4.250.0160.00214.24
5.4.240.0100.00314.24
5.4.230.0170.00514.24
5.4.220.0200.00414.24
5.4.210.0190.00514.24
5.4.200.0190.00514.24
5.4.190.0190.00514.24
5.4.180.0090.00314.24
5.4.170.0160.00514.24
5.4.160.0090.00314.24
5.4.150.0120.00014.24
5.4.140.0160.00514.24
5.4.130.0200.00514.24
5.4.120.0180.00714.24
5.4.110.0180.00514.24
5.4.100.0160.00314.24
5.4.90.0090.00314.24
5.4.80.0090.00214.24
5.4.70.0080.00314.24
5.4.60.0230.00314.24
5.4.50.0180.00514.24
5.4.40.0170.00614.24
5.4.30.0180.00614.24
5.4.20.0100.00214.24
5.4.10.0200.00414.24
5.4.00.0190.00514.24
5.3.290.0170.00814.24
5.3.280.0160.00914.24
5.3.270.0170.01014.24
5.3.260.0190.00714.24
5.3.250.0180.00714.24
5.3.240.0180.00714.24
5.3.230.0170.00814.24
5.3.220.0180.00414.24
5.3.210.0190.00914.24
5.3.200.0210.00814.24
5.3.190.0180.00514.24
5.3.180.0080.00414.24
5.3.170.0160.00414.24
5.3.160.0120.00514.24
5.3.150.0090.00514.24
5.3.140.0190.00614.24
5.3.130.0190.00714.24
5.3.120.0190.00314.24
5.3.110.0140.00414.24
5.3.100.0080.00414.24
5.3.90.0070.00314.24
5.3.80.0170.00714.24
5.3.70.0190.00714.24
5.3.60.0200.00414.24
5.3.50.0180.00614.24
5.3.40.0210.00414.24
5.3.30.0190.00614.24
5.3.20.0200.00414.24
5.3.10.0200.00414.24
5.3.00.0180.00414.24
5.2.170.0140.00514.24
5.2.160.0190.00314.24
5.2.150.0140.00614.24
5.2.140.0150.00614.24
5.2.130.0170.00314.24
5.2.120.0140.00614.24
5.2.110.0170.00314.24
5.2.100.0150.00614.24
5.2.90.0130.00714.24
5.2.80.0160.00514.24
5.2.70.0150.00514.24
5.2.60.0120.00814.24
5.2.50.0140.00514.24
5.2.40.0160.00514.24
5.2.30.0170.00714.24
5.2.20.0100.00214.24
5.2.10.0060.00514.24
5.2.00.0130.00314.24
5.1.60.0110.00614.24
5.1.50.0070.00514.24
5.1.40.0060.00214.24
5.1.30.0050.00414.24
5.1.20.0060.00214.24
5.1.10.0080.00014.24
5.1.00.0060.00214.24
5.0.50.0050.00214.24
5.0.40.0030.00414.24
5.0.30.0070.00114.24
5.0.20.0060.00114.24
5.0.10.0050.00314.24
5.0.00.0040.00314.24
4.4.90.0040.00014.24
4.4.80.0040.00014.24
4.4.70.0030.00214.24
4.4.60.0030.00114.24
4.4.50.0050.00314.24
4.4.40.0070.00214.24
4.4.30.0080.00114.24
4.4.20.0090.00014.24
4.4.10.0080.00114.24
4.4.00.0090.00014.24
4.3.110.0080.00114.24
4.3.100.0080.00114.24
4.3.90.0070.00114.24
4.3.80.0070.00314.24
4.3.70.0080.00114.24
4.3.60.0080.00014.24
4.3.50.0080.00114.24
4.3.40.0080.00014.24
4.3.30.0060.00114.24
4.3.20.0070.00014.24
4.3.10.0060.00114.24
4.3.00.0060.00114.24

preferences:
29.63 ms | 403 KiB | 5 Q