3v4l.org

run code in 300+ PHP versions simultaneously
<?php function instantiable($className) { if (! $className) { return true; } $reflection = new ReflectionClass($className); $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.60.0100.00616.63
8.3.50.0120.00521.99
8.3.40.0100.01018.67
8.3.30.0070.01019.21
8.3.20.0040.00420.39
8.3.10.0050.00523.48
8.3.00.0000.00917.93
8.2.180.0130.00616.50
8.2.170.0100.00722.96
8.2.160.0130.00320.28
8.2.150.0060.00324.18
8.2.140.0030.00624.66
8.2.130.0030.00626.16
8.2.120.0060.00321.02
8.2.110.0070.00322.24
8.2.100.0060.00617.82
8.2.90.0040.00419.22
8.2.80.0050.00517.97
8.2.70.0000.00917.63
8.2.60.0030.00618.05
8.2.50.0000.01018.07
8.2.40.0040.00718.28
8.2.30.0040.00718.42
8.2.20.0030.00517.70
8.2.10.0000.00818.11
8.2.00.0030.00617.89
8.1.280.0140.01025.92
8.1.270.0030.00723.80
8.1.260.0090.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00323.92
8.1.230.0130.00019.21
8.1.220.0000.00817.74
8.1.210.0060.00318.77
8.1.200.0050.00517.48
8.1.190.0000.01017.48
8.1.180.0030.00618.10
8.1.170.0060.00318.79
8.1.160.0040.00422.13
8.1.150.0080.00018.99
8.1.140.0040.00417.46
8.1.130.0030.00617.88
8.1.120.0000.00817.54
8.1.110.0090.00017.40
8.1.100.0050.00317.43
8.1.90.0040.00417.48
8.1.80.0000.00817.52
8.1.70.0100.00017.43
8.1.60.0030.00617.65
8.1.50.0000.00917.48
8.1.40.0000.00817.63
8.1.30.0060.00317.61
8.1.20.0000.00817.68
8.1.10.0050.00317.52
8.1.00.0000.00817.59
8.0.300.0000.00919.66
8.0.290.0080.00016.75
8.0.280.0050.00318.40
8.0.270.0030.00616.76
8.0.260.0050.00217.22
8.0.250.0040.00416.91
8.0.240.0040.00416.98
8.0.230.0040.00416.95
8.0.220.0070.00016.99
8.0.210.0000.00816.96
8.0.200.0060.00316.88
8.0.190.0040.00816.89
8.0.180.0000.01016.92
8.0.170.0060.00317.01
8.0.160.0000.00916.84
8.0.150.0040.00416.84
8.0.140.0080.00016.86
8.0.130.0000.01013.41
8.0.120.0060.00316.79
8.0.110.0040.00416.77
8.0.100.0000.00816.96
8.0.90.0080.00016.83
8.0.80.0110.00616.87
8.0.70.0050.00316.75
8.0.60.0000.00816.97
8.0.50.0060.00316.97
8.0.30.0090.01317.18
8.0.20.0110.01117.40
8.0.10.0030.00517.07
8.0.00.0090.01417.05
7.4.330.0000.00515.08
7.4.320.0000.00716.54
7.4.300.0000.00716.63
7.4.290.0040.00416.65
7.4.280.0000.00816.55
7.4.270.0060.00316.45
7.4.260.0030.00616.43
7.4.250.0080.00016.62
7.4.240.0030.00516.55
7.4.230.0040.00416.40
7.4.220.0130.01716.73
7.4.210.0130.00716.51
7.4.200.0000.00716.39
7.4.160.0130.01316.50
7.4.150.0150.00617.40
7.4.140.0100.01117.86
7.4.130.0150.01116.45
7.4.120.0120.00916.52
7.4.110.0070.02116.69
7.4.100.0080.01316.55
7.4.90.0080.01216.47
7.4.80.0110.01119.39
7.4.70.0050.01816.52
7.4.60.0040.01516.44
7.4.50.0070.00416.43
7.4.40.0080.01216.68
7.4.30.0120.00916.67
7.4.00.0030.01414.91
7.3.330.0050.00013.36
7.3.320.0000.00613.42
7.3.310.0030.00616.49
7.3.300.0040.00416.28
7.3.290.0060.01716.39
7.3.280.0110.01116.40
7.3.270.0100.01017.40
7.3.260.0140.00916.55
7.3.250.0160.00716.41
7.3.240.0150.00616.40
7.3.230.0150.00616.45
7.3.210.0180.00316.63
7.3.200.0070.01819.39
7.3.190.0150.00616.52
7.3.180.0070.01516.68
7.3.170.0180.00916.47
7.3.160.0180.00416.67
7.3.120.0030.01014.95
7.2.330.0210.00916.70
7.2.320.0100.01016.88
7.2.310.0150.01516.79
7.2.300.0160.00316.41
7.2.290.0150.01116.66
7.2.60.0000.01416.76
7.2.00.0040.00819.57
7.1.200.0040.00715.78
7.1.100.0030.01017.98
7.1.70.0000.00817.16
7.1.60.0100.01619.70
7.1.50.0170.01017.05
7.1.00.0100.07322.44
7.0.200.0140.00016.78
7.0.140.0100.07022.12
7.0.60.0000.04320.05
7.0.50.0030.04718.00
7.0.40.0030.04317.75
7.0.30.0030.04017.75
7.0.20.0030.05317.80
7.0.10.0030.04017.75
7.0.00.0030.04017.70
5.6.280.0000.07720.96
5.6.210.0070.08320.57
5.6.200.0030.04318.18
5.6.190.0100.07718.15
5.6.180.0000.04318.20
5.6.170.0100.04318.17
5.6.160.0030.04018.13
5.6.150.0030.04018.22
5.6.140.0070.05318.25
5.6.130.0000.04318.19
5.6.120.0000.04318.19
5.6.110.0070.03718.26
5.6.100.0170.07018.17
5.6.90.0100.08018.18
5.6.80.0070.06017.58
5.6.70.0100.08017.68
5.6.60.0170.07317.66
5.6.50.0130.03017.52
5.6.40.0130.06017.53
5.6.30.0100.03717.55
5.6.20.0100.05317.63
5.6.10.0070.08017.61
5.6.00.0100.04017.54
5.5.350.0200.06320.51
5.5.340.0030.03718.07
5.5.330.0070.04017.97
5.5.320.0070.03717.95
5.5.310.0030.04018.08
5.5.300.0000.04018.07
5.5.290.0000.04317.98
5.5.280.0030.04017.95
5.5.270.0070.04318.04
5.5.260.0030.07317.97
5.5.250.0070.07317.79
5.5.240.0070.07717.36
5.5.230.0100.07317.43
5.5.220.0000.08317.37
5.5.210.0070.05317.36
5.5.200.0070.05317.38
5.5.190.0030.04017.29
5.5.180.0000.08317.27
5.5.160.0030.08017.34
5.5.150.0030.05017.42
5.5.140.0070.07717.36
5.5.130.0130.05717.30
5.5.120.0000.04717.30
5.5.110.0070.07717.43
5.5.100.0030.05017.30
5.5.90.0100.04017.34
5.5.80.0100.06717.21
5.5.70.0000.08017.23
5.5.60.0100.07017.19
5.5.50.0100.03317.26
5.5.40.0130.05017.28
5.5.30.0070.08017.21
5.5.20.0100.07317.22
5.5.10.0070.07017.19
5.5.00.0030.07317.22
5.4.450.0000.04019.36
5.4.440.0000.04319.60
5.4.430.0100.06319.30
5.4.420.0000.04019.34
5.4.410.0100.07319.23
5.4.400.0030.07719.11
5.4.390.0070.04718.99
5.4.380.0000.05718.89
5.4.370.0070.07719.05
5.4.360.0070.06719.05
5.4.350.0100.04718.99
5.4.340.0030.08319.13
5.4.320.0030.05319.03
5.4.310.0070.08018.96
5.4.300.0070.06719.02
5.4.290.0100.07319.04
5.4.280.0030.06719.02
5.4.270.0100.06319.09
5.4.260.0100.06019.03
5.4.250.0030.04719.01
5.4.240.0100.04319.16
5.4.230.0070.07319.12
5.4.220.0070.07319.04
5.4.210.0030.05319.01
5.4.200.0030.05019.01
5.4.190.0100.07319.02
5.4.180.0070.07319.11
5.4.170.0230.03318.94
5.4.160.0070.08019.07
5.4.150.0100.07718.93
5.4.140.0100.07316.51
5.4.130.0070.04016.36
5.4.120.0130.07016.63
5.4.110.0030.07716.47
5.4.100.0070.06716.52
5.4.90.0230.05316.51
5.4.80.0130.06716.57
5.4.70.0100.06716.45
5.4.60.0070.04716.39
5.4.50.0030.07016.40
5.4.40.0100.04016.32
5.4.30.0000.07316.27
5.4.20.0030.04716.29
5.4.10.0070.07716.39
5.4.00.0030.07715.84
5.3.290.0230.05714.78
5.3.280.0070.05314.65
5.3.270.0030.05014.64
5.3.260.0030.04714.66
5.3.250.0030.04014.58
5.3.240.0100.04314.64
5.3.230.0100.07314.67
5.3.220.0130.07014.61
5.3.210.0000.08714.43
5.3.200.0070.04314.65
5.3.190.0030.04714.54
5.3.180.0200.06714.61
5.3.170.0270.05314.67
5.3.160.0070.07314.62
5.3.150.0130.04314.62
5.3.140.0100.07314.61
5.3.130.0070.04014.56
5.3.120.0000.07714.76
5.3.110.0030.04014.56
5.3.100.0130.03714.15
5.3.90.0000.07714.04
5.3.80.0030.08013.87
5.3.70.0100.06713.91
5.3.60.0030.04714.08
5.3.50.0030.03714.00
5.3.40.0030.03714.03
5.3.30.0100.05313.96
5.3.20.0100.05713.75
5.3.10.0200.05713.55
5.3.00.0030.06313.71
5.2.170.0100.02311.19
5.2.160.0070.02711.16
5.2.150.0000.05711.19
5.2.140.0070.04711.20
5.2.130.0070.03711.15
5.2.120.0000.04711.12
5.2.110.0070.06011.03
5.2.100.0030.06011.00
5.2.90.0000.06311.14
5.2.80.0030.06711.19
5.2.70.0100.05311.13
5.2.60.0000.06011.04
5.2.50.0070.04310.92
5.2.40.0030.04010.99
5.2.30.0100.06010.95
5.2.20.0100.05310.92
5.2.10.0070.03010.76
5.2.00.0000.06310.75
5.1.60.0030.0479.97
5.1.50.0030.05010.00
5.1.40.0070.0539.81
5.1.30.0070.03710.39
5.1.20.0070.05310.41
5.1.10.0100.03310.12
5.1.00.0070.05310.15
5.0.50.0100.0378.52
5.0.40.0030.0408.48
5.0.30.0030.0578.48
5.0.20.0030.0208.48
5.0.10.0100.0308.48
5.0.00.0070.0608.48
4.4.90.0000.0408.48
4.4.80.0100.0208.48
4.4.70.0000.0278.48
4.4.60.0000.0308.48
4.4.50.0030.0238.48
4.4.40.0100.0238.48
4.4.30.0000.0278.48
4.4.20.0070.0278.48
4.4.10.0100.0338.48
4.4.00.0000.0578.48
4.3.110.0030.0338.48
4.3.100.0030.0338.48
4.3.90.0000.0338.48
4.3.80.0070.0508.48
4.3.70.0000.0208.48
4.3.60.0000.0308.48
4.3.50.0000.0378.48
4.3.40.0000.0578.48
4.3.30.0070.0308.48
4.3.20.0000.0338.48
4.3.10.0000.0238.48
4.3.00.0000.0238.48

preferences:
44.35 ms | 401 KiB | 5 Q