3v4l.org

run code in 300+ PHP versions simultaneously
<?php function instantiable($className) { if (! $className) { return true; } $reflection = new ReflectionClass($className); if ($reflection->isAbstract()) { return false; } $hasFinalConstruct = false; if ($reflection->hasMethod('__construct')) { $hasFinalConstruct = $reflection->getMethod('__construct')->isFinal(); } $parentClass = $reflection->getParentClass(); return instantiable($parentClass ? $parentClass->getName() : null) && ! ($reflection->isInternal() && $hasFinalConstruct); } $negate = function ($function) { return function (...$args) use ($function) { return ! $function(...$args); }; }; var_dump([ 'instantiable' => array_filter(get_declared_classes(), 'instantiable'), 'not_instantiable' => array_filter(get_declared_classes(), $negate('instantiable')), ]);

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.0070.01016.58
8.3.60.0100.00716.50
8.3.50.0110.00821.99
8.3.40.0150.00918.74
8.3.30.0140.00419.22
8.3.20.0060.00320.20
8.3.10.0040.00423.48
8.3.00.0090.00017.80
8.2.180.0100.00716.50
8.2.170.0030.01322.96
8.2.160.0060.01020.47
8.2.150.0060.00624.18
8.2.140.0060.00324.66
8.2.130.0090.00026.16
8.2.120.0040.00420.93
8.2.110.0100.00022.11
8.2.100.0120.00017.78
8.2.90.0000.00819.29
8.2.80.0040.00417.97
8.2.70.0100.00617.63
8.2.60.0070.00318.05
8.2.50.0070.00318.07
8.2.40.0060.00319.94
8.2.30.0030.00618.21
8.2.20.0000.00917.78
8.2.10.0040.00418.12
8.2.00.0080.00017.78
8.1.280.0130.01025.92
8.1.270.0070.00323.96
8.1.260.0090.00026.35
8.1.250.0040.00428.09
8.1.240.0100.00023.88
8.1.230.0130.00019.08
8.1.220.0000.00917.79
8.1.210.0060.00318.77
8.1.200.0000.00917.48
8.1.190.0030.00617.25
8.1.180.0060.00318.10
8.1.170.0060.00618.54
8.1.160.0000.00821.93
8.1.150.0080.00018.82
8.1.140.0050.00317.42
8.1.130.0000.00717.82
8.1.120.0050.00317.34
8.1.110.0090.00017.40
8.1.100.0030.00617.53
8.1.90.0000.00817.39
8.1.80.0040.00417.45
8.1.70.0050.00317.44
8.1.60.0090.00017.65
8.1.50.0000.00817.45
8.1.40.0040.00417.48
8.1.30.0000.00917.58
8.1.20.0000.01017.75
8.1.10.0080.00017.47
8.1.00.0000.00817.52
8.0.300.0050.00318.77
8.0.290.0060.00316.63
8.0.280.0000.00818.50
8.0.270.0040.00417.18
8.0.260.0000.00717.25
8.0.250.0080.00016.96
8.0.240.0030.00516.84
8.0.230.0000.00816.93
8.0.220.0040.00416.80
8.0.210.0040.00416.86
8.0.200.0020.00516.90
8.0.190.0030.00716.86
8.0.180.0040.00416.99
8.0.170.0000.00816.93
8.0.160.0030.00616.86
8.0.150.0030.00616.88
8.0.140.0080.00016.88
8.0.130.0050.00313.38
8.0.120.0030.00616.90
8.0.110.0000.00816.95
8.0.100.0030.00616.80
8.0.90.0090.00016.92
8.0.80.0060.01216.86
8.0.70.0000.00916.91
8.0.60.0000.00816.82
8.0.50.0060.00316.87
8.0.30.0120.01117.08
8.0.20.0140.01217.40
8.0.10.0040.00416.92
8.0.00.0160.00616.90
7.4.330.0060.00015.20
7.4.320.0040.00416.52
7.4.300.0030.00316.60
7.4.290.0000.00816.57
7.4.280.0000.00816.51
7.4.270.0060.00316.66
7.4.260.0040.00416.57
7.4.250.0080.00016.62
7.4.240.0060.00216.60
7.4.230.0070.00016.59
7.4.220.0040.01716.58
7.4.210.0130.00316.68
7.4.200.0060.00316.42
7.4.160.0110.01116.56
7.4.150.0110.01317.40
7.4.140.0130.00917.86
7.4.130.0090.01416.54
7.4.120.0130.00716.55
7.4.110.0160.00916.44
7.4.100.0190.00416.39
7.4.90.0070.01416.48
7.4.80.0060.01519.39
7.4.70.0070.01416.39
7.4.60.0090.01216.55
7.4.50.0060.00016.25
7.4.40.0090.01216.60
7.4.30.0200.00716.57
7.4.00.0050.01314.91
7.3.330.0060.00013.38
7.3.320.0030.00313.43
7.3.310.0040.00416.43
7.3.300.0000.00716.23
7.3.290.0090.00916.37
7.3.280.0120.00716.37
7.3.270.0070.01417.40
7.3.260.0140.01016.60
7.3.250.0140.01216.59
7.3.240.0110.01116.49
7.3.230.0110.01116.60
7.3.210.0120.01016.48
7.3.200.0100.01019.39
7.3.190.0120.01616.52
7.3.180.0070.01016.44
7.3.170.0170.00316.32
7.3.160.0120.00916.42
7.3.120.0110.00714.92
7.3.110.0030.01715.01
7.3.100.0070.01015.05
7.3.90.0090.00615.05
7.3.80.0060.00914.86
7.3.70.0080.00814.93
7.3.60.0000.01214.86
7.3.50.0070.00714.55
7.3.40.0040.01114.91
7.3.30.0030.01214.63
7.3.20.0110.00416.55
7.3.10.0060.00616.77
7.3.00.0080.00316.89
7.2.330.0150.00716.60
7.2.320.0090.01816.57
7.2.310.0140.01016.53
7.2.300.0100.01716.50
7.2.290.0100.00816.57
7.2.250.0030.01915.34
7.2.240.0130.00314.77
7.2.230.0110.00615.15
7.2.220.0100.00314.88
7.2.210.0040.01115.25
7.2.200.0030.01315.27
7.2.190.0040.00814.75
7.2.180.0110.00414.91
7.2.170.0070.01115.07
7.2.60.0030.01016.56
7.2.50.0070.01117.12
7.2.00.0030.01019.21
7.1.330.0110.00715.44
7.1.320.0030.00715.66
7.1.310.0040.01115.71
7.1.300.0090.00615.89
7.1.290.0090.01215.87
7.1.280.0000.01715.88
7.1.270.0060.01315.96
7.1.260.0060.00916.00
7.1.200.0040.01115.98
7.1.70.0070.00717.20
7.1.60.0100.01719.70
7.1.50.0100.01716.79
7.1.00.0000.08022.40
7.0.200.0030.00716.79
7.0.140.0000.08021.92
7.0.60.0130.05720.09
7.0.50.0070.07718.02
7.0.40.0070.09320.23
7.0.30.0330.03720.06
7.0.20.0170.04320.12
7.0.10.0330.05320.16
7.0.00.0100.07020.33
5.6.280.0030.07720.95
5.6.210.0030.04020.79
5.6.200.0100.07718.14
5.6.190.0070.07720.63
5.6.180.0130.08320.60
5.6.170.0330.08020.47
5.6.160.0170.06720.71
5.6.150.0130.06018.27
5.6.140.0130.07718.15
5.6.130.0170.08018.18
5.6.120.0170.08021.23
5.6.110.0100.08021.17
5.6.100.0230.07021.02
5.6.90.0100.08721.00
5.6.80.0170.07320.48
5.6.70.0200.03720.54
5.5.350.0100.04020.44
5.5.340.0030.04017.95
5.5.330.0000.08320.43
5.5.320.0030.04020.19
5.5.310.0330.07320.31
5.5.300.0030.05318.04
5.5.290.0070.04018.04
5.5.280.0130.07721.00
5.5.270.0100.04320.78
5.5.260.0030.06320.88
5.5.250.0030.08320.61
5.5.240.0030.08320.27
5.4.450.0700.05319.34
5.4.440.0600.05719.57
5.4.430.0500.04719.66
5.4.420.0900.05019.44
5.4.410.0130.05318.72
5.4.400.0300.06318.52
5.4.390.0370.05318.74
5.4.380.0070.06018.78
5.4.370.0000.04318.68
5.4.360.0100.04018.45
5.4.350.0070.03312.04
5.4.340.0110.03512.04
5.4.320.0070.03812.53
5.4.310.0060.04012.52
5.4.300.0050.03812.53
5.4.290.0080.03612.52
5.4.280.0030.04012.42
5.4.270.0100.03212.42
5.4.260.0050.03912.42
5.4.250.0060.03812.42
5.4.240.0060.03612.42
5.4.230.0070.04212.41
5.4.220.0040.04212.41
5.4.210.0110.03912.41
5.4.200.0080.03612.41
5.4.190.0080.03412.41
5.4.180.0020.04012.41
5.4.170.0050.03712.41
5.4.160.0050.03712.41
5.4.150.0050.03812.40
5.4.140.0090.03412.10
5.4.130.0040.03712.08
5.4.120.0080.03312.04
5.4.110.0050.03612.04
5.4.100.0040.03612.04
5.4.90.0010.04112.04
5.4.80.0090.03412.04
5.4.70.0040.03712.04
5.4.60.0060.04612.04
5.4.50.0060.03612.04
5.4.40.0080.03712.02
5.4.30.0100.04112.02
5.4.20.0050.03712.02
5.4.10.0080.03212.02
5.4.00.0110.03611.52
5.3.290.0080.04312.80
5.3.280.0060.03812.71
5.3.270.0090.04012.72
5.3.260.0040.04112.72
5.3.250.0100.03412.72
5.3.240.0040.03812.72
5.3.230.0090.03412.71
5.3.220.0050.03812.68
5.3.210.0050.04112.68
5.3.200.0090.04012.68
5.3.190.0050.03912.68
5.3.180.0070.03912.68
5.3.170.0030.03912.67
5.3.160.0060.04312.67
5.3.150.0060.03912.67
5.3.140.0070.03612.66
5.3.130.0060.04512.66
5.3.120.0090.03912.66
5.3.110.0080.03712.66
5.3.100.0030.04012.13
5.3.90.0080.03412.12
5.3.80.0080.04012.11
5.3.70.0050.03712.11
5.3.60.0070.03512.10
5.3.50.0060.03612.03
5.3.40.0030.03912.03
5.3.30.0090.03111.99
5.3.20.0070.03411.78
5.3.10.0100.03111.75
5.3.00.0040.03811.73
5.2.170.0040.0319.22
5.2.160.0070.0279.22
5.2.150.0030.0329.22
5.2.140.0090.0289.22
5.2.130.0040.0299.18
5.2.120.0040.0299.18
5.2.110.0070.0349.18
5.2.100.0060.0279.18
5.2.90.0060.0289.18
5.2.80.0040.0319.18
5.2.70.0060.0289.18
5.2.60.0090.0269.13
5.2.50.0080.0279.10
5.2.40.0040.0299.07
5.2.30.0030.0329.05
5.2.20.0050.0289.05
5.2.10.0020.0318.95
5.2.00.0060.0278.82
5.1.60.0060.0228.09
5.1.50.0030.0268.09
5.1.40.0040.0258.07
5.1.30.0060.0248.43
5.1.20.0060.0318.45
5.1.10.0050.0268.17
5.1.00.0060.0248.16
5.0.50.0080.0186.65
5.0.40.0040.0246.52
5.0.30.0030.0326.33
5.0.20.0090.0226.29
5.0.10.0030.0286.28
5.0.00.0060.0326.27
4.4.90.0040.0224.78
4.4.80.0020.0164.75
4.4.70.0050.0214.75
4.4.60.0040.0194.76
4.4.50.0030.0194.77
4.4.40.0050.0264.71
4.4.30.0030.0194.75
4.4.20.0040.0184.84
4.4.10.0020.0174.85
4.4.00.0000.0284.76
4.3.110.0040.0234.67
4.3.100.0030.0144.66
4.3.90.0040.0144.64
4.3.80.0030.0254.59
4.3.70.0000.0174.63
4.3.60.0030.0224.62
4.3.50.0050.0194.63
4.3.40.0030.0244.54
4.3.30.0050.0143.30
4.3.20.0030.0173.28
4.3.10.0020.0153.24
4.3.00.0070.0177.57

preferences:
37.24 ms | 401 KiB | 5 Q