3v4l.org

run code in 300+ PHP versions simultaneously
<?php $instantiable = function($className) use (& $instantiable) { 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.0140.00316.62
8.3.50.0120.00622.11
8.3.40.0240.00018.48
8.3.30.0120.00619.17
8.3.20.0080.00020.32
8.3.10.0060.00323.66
8.3.00.0030.00617.80
8.2.180.0070.01416.50
8.2.170.0130.00322.96
8.2.160.0060.01020.43
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0080.00026.16
8.2.120.0040.00420.94
8.2.110.0070.00420.47
8.2.100.0090.00317.72
8.2.90.0040.00419.27
8.2.80.0000.00917.97
8.2.70.0040.00417.75
8.2.60.0070.00418.04
8.2.50.0000.01018.07
8.2.40.0030.00618.05
8.2.30.0030.00718.42
8.2.20.0030.00517.82
8.2.10.0000.00818.13
8.2.00.0000.00817.74
8.1.280.0080.00825.92
8.1.270.0060.00324.66
8.1.260.0060.00326.35
8.1.250.0090.00028.09
8.1.240.0050.00523.77
8.1.230.0060.00622.23
8.1.220.0000.01017.89
8.1.210.0040.00418.77
8.1.200.0000.00917.47
8.1.190.0000.00917.48
8.1.180.0030.00618.10
8.1.170.0050.01018.52
8.1.160.0080.00022.08
8.1.150.0040.00419.00
8.1.140.0030.00617.54
8.1.130.0080.00017.88
8.1.120.0000.00817.52
8.1.110.0080.00017.52
8.1.100.0060.00317.52
8.1.90.0030.00517.55
8.1.80.0040.00417.39
8.1.70.0030.00817.51
8.1.60.0070.00317.67
8.1.50.0060.00317.50
8.1.40.0000.00817.55
8.1.30.0040.00417.60
8.1.20.0060.00317.70
8.1.10.0000.00917.70
8.1.00.0060.00317.47
8.0.300.0040.00418.77
8.0.290.0080.00016.75
8.0.280.0040.00418.49
8.0.270.0000.00817.31
8.0.260.0060.00317.31
8.0.250.0000.00817.05
8.0.240.0040.00417.01
8.0.230.0050.00316.90
8.0.220.0070.00016.99
8.0.210.0000.00717.00
8.0.200.0070.00316.98
8.0.190.0030.00716.96
8.0.180.0000.00817.00
8.0.170.0040.00417.00
8.0.160.0030.00617.05
8.0.150.0000.00816.95
8.0.140.0040.00416.76
8.0.130.0090.00013.41
8.0.120.0030.00616.88
8.0.110.0000.00816.91
8.0.100.0000.00816.81
8.0.90.0000.00916.84
8.0.80.0060.01616.91
8.0.70.0080.00016.74
8.0.60.0000.00816.84
8.0.50.0080.00016.92
8.0.30.0160.01117.19
8.0.20.0190.00517.40
8.0.10.0080.00017.09
8.0.00.0130.01416.72
7.4.330.0000.00515.00
7.4.320.0000.00716.66
7.4.300.0030.00316.65
7.4.290.0050.00316.68
7.4.280.0030.00616.55
7.4.270.0050.00316.66
7.4.260.0050.00316.46
7.4.250.0000.00816.44
7.4.240.0040.00416.56
7.4.230.0050.00316.44
7.4.220.0200.01016.61
7.4.210.0130.00316.60
7.4.200.0000.00716.56
7.4.160.0150.01216.39
7.4.150.0130.01017.40
7.4.140.0140.00917.86
7.4.130.0140.01216.50
7.4.120.0140.00616.51
7.4.110.0090.01216.77
7.4.100.0040.01616.54
7.4.90.0130.00716.46
7.4.80.0160.00619.39
7.4.70.0090.01516.58
7.4.60.0130.00916.49
7.4.50.0060.00316.76
7.4.40.0110.00816.65
7.4.30.0140.00816.50
7.4.00.0120.00414.98
7.3.330.0030.00313.39
7.3.320.0000.00613.43
7.3.310.0000.00816.40
7.3.300.0070.00016.42
7.3.290.0120.00916.39
7.3.280.0080.01016.39
7.3.270.0150.01017.40
7.3.260.0120.01116.45
7.3.250.0090.01316.45
7.3.240.0120.00916.57
7.3.230.0110.01116.64
7.3.210.0160.00816.66
7.3.200.0060.01219.39
7.3.190.0080.01416.42
7.3.180.0070.01016.74
7.3.170.0110.00716.71
7.3.160.0040.01616.64
7.3.120.0060.01014.70
7.3.10.0060.00916.62
7.3.00.0040.00716.69
7.2.330.0210.00016.80
7.2.320.0100.01016.49
7.2.310.0090.01816.48
7.2.300.0040.01916.86
7.2.290.0150.00816.73
7.2.130.0100.00716.75
7.2.120.0040.01217.10
7.2.110.0140.01016.77
7.2.100.0090.00916.80
7.2.90.0090.00616.84
7.2.80.0170.00316.86
7.2.70.0060.00917.06
7.2.60.0050.00817.02
7.2.50.0030.01017.13
7.2.40.0130.00616.57
7.2.30.0090.00916.52
7.2.20.0110.00416.85
7.2.10.0070.01016.86
7.2.00.0080.00817.94
7.1.250.0030.01315.79
7.1.200.0030.01315.85
7.1.100.0030.01217.99
7.1.70.0000.01116.86
7.1.60.0140.01419.70
7.1.50.0100.01417.05
7.1.00.0000.08322.37
7.0.200.0050.00316.70
7.0.140.0030.07722.12
7.0.60.0100.08320.05
7.0.50.0100.07718.02
7.0.40.0170.07320.21
7.0.30.0530.07320.24
7.0.20.0230.03320.15
7.0.10.0130.08020.26
7.0.00.0070.08320.25
5.6.280.0030.07721.03
5.6.210.0070.07720.50
5.6.200.0070.08318.16
5.6.190.0030.04720.48
5.6.180.0400.04320.47
5.6.170.0170.04020.57
5.6.160.0030.09020.62
5.6.150.0030.08318.29
5.6.140.0030.04318.14
5.6.130.0030.06318.22
5.6.120.0070.05721.03
5.6.110.0130.08321.00
5.6.100.0130.07021.17
5.6.90.0130.07721.03
5.6.80.0270.07020.42
5.5.350.0270.05320.36
5.5.340.0030.06718.09
5.5.330.0100.07320.40
5.5.320.0230.03320.25
5.5.310.0470.06720.27
5.5.300.0130.07317.98
5.5.290.0000.08717.97
5.5.280.0130.07720.98
5.5.270.0070.04020.99
5.5.260.0100.08020.68
5.5.250.0030.08720.59
5.5.240.0100.07020.18
5.4.450.0830.05319.61
5.4.440.1070.05719.72
5.4.430.0770.04719.47
5.4.420.0930.06019.47
5.4.410.0030.05718.98
5.4.400.0400.05318.63
5.4.390.0370.04718.59
5.4.380.0130.06018.74
5.4.370.0100.03718.61
5.4.360.0130.03018.69
5.4.350.0070.03212.04
5.4.340.0030.04212.04
5.4.320.0060.04712.53
5.4.310.0040.07312.52
5.4.300.0090.03412.52
5.4.290.0030.04012.52
5.4.280.0070.03512.42
5.4.270.0030.03912.42
5.4.260.0070.03612.42
5.4.250.0080.04312.42
5.4.240.0040.03712.42
5.4.230.0040.03912.41
5.4.220.0050.03712.41
5.4.210.0100.03212.42
5.4.200.0080.03412.41
5.4.190.0090.03912.41
5.4.180.0050.03712.41
5.4.170.0040.03712.41
5.4.160.0080.04812.41
5.4.150.0080.03412.40
5.4.140.0070.04712.09
5.4.130.0080.03612.07
5.4.120.0070.03412.04
5.4.110.0050.03612.04
5.4.100.0040.04312.04
5.4.90.0050.03912.04
5.4.80.0070.03512.04
5.4.70.0040.03712.03
5.4.60.0060.03812.04
5.4.50.0090.03612.04
5.4.40.0040.03612.02
5.4.30.0070.03312.02
5.4.20.0050.03612.02
5.4.10.0070.03312.02
5.4.00.0070.03411.51
5.3.290.0170.05112.80
5.3.280.0090.03312.71
5.3.270.0060.03912.72
5.3.260.0060.03912.72
5.3.250.0060.03712.72
5.3.240.0070.03612.72
5.3.230.0060.03812.71
5.3.220.0050.04212.68
5.3.210.0080.03612.68
5.3.200.0050.04312.68
5.3.190.0040.03912.68
5.3.180.0060.03612.67
5.3.170.0030.03812.67
5.3.160.0050.03612.67
5.3.150.0060.03712.68
5.3.140.0090.03112.66
5.3.130.0110.04212.66
5.3.120.0080.04012.65
5.3.110.0090.03912.66
5.3.100.0060.03712.14
5.3.90.0030.04012.11
5.3.80.0030.03912.10
5.3.70.0060.04012.10
5.3.60.0080.04012.09
5.3.50.0050.04212.04
5.3.40.0080.03512.04
5.3.30.0080.03612.00
5.3.20.0060.03411.78
5.3.10.0050.03711.75
5.3.00.0080.03511.72
5.2.170.0040.0339.18
5.2.160.0070.0269.18
5.2.150.0060.0279.18
5.2.140.0030.0319.18
5.2.130.0080.0329.14
5.2.120.0040.0289.14
5.2.110.0040.0299.14
5.2.100.0060.0269.14
5.2.90.0020.0319.14
5.2.80.0050.0299.14
5.2.70.0080.0299.14
5.2.60.0050.0309.09
5.2.50.0030.0309.06
5.2.40.0060.0389.03
5.2.30.0040.0309.01
5.2.20.0060.0329.00
5.2.10.0080.0258.93
5.2.00.0040.0298.78
5.1.60.0060.0228.06
5.1.50.0050.0248.06
5.1.40.0100.0258.05
5.1.30.0030.0278.40
5.1.20.0030.0288.42
5.1.10.0030.0278.14
5.1.00.0040.0368.14
5.0.50.0040.0206.63
5.0.40.0020.0216.48
5.0.30.0030.0346.29
5.0.20.0040.0186.27
5.0.10.0040.0196.25
5.0.00.0020.0336.23
4.4.90.0050.0144.78
4.4.80.0030.0174.75
4.4.70.0020.0204.75
4.4.60.0030.0174.75
4.4.50.0020.0164.77
4.4.40.0070.0214.71
4.4.30.0030.0164.76
4.4.20.0040.0144.85
4.4.10.0030.0154.85
4.4.00.0030.0244.76
4.3.110.0020.0164.67
4.3.100.0030.0144.67
4.3.90.0050.0124.64
4.3.80.0030.0244.58
4.3.70.0050.0164.63
4.3.60.0030.0154.63
4.3.50.0030.0164.63
4.3.40.0010.0274.54
4.3.30.0040.0143.29
4.3.20.0020.0163.26
4.3.10.0030.0153.22
4.3.00.0170.0177.16

preferences:
40.03 ms | 401 KiB | 5 Q