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); }; function not($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(), not('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.0120.01216.63
8.3.50.0100.01016.38
8.3.40.0170.00018.81
8.3.30.0070.01119.19
8.3.20.0000.01020.13
8.3.10.0000.00921.71
8.3.00.0040.00417.93
8.2.180.0190.00316.32
8.2.170.0080.00822.96
8.2.160.0070.00720.39
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0080.00020.97
8.2.110.0030.00722.27
8.2.100.0090.00320.52
8.2.90.0000.00819.23
8.2.80.0090.00017.97
8.2.70.0040.00417.63
8.2.60.0040.00417.93
8.2.50.0060.00318.07
8.2.40.0060.00318.22
8.2.30.0080.00418.35
8.2.20.0060.00317.67
8.2.10.0000.00818.17
8.2.00.0050.00517.86
8.1.280.0100.00725.92
8.1.270.0030.00623.88
8.1.260.0060.00326.35
8.1.250.0050.00328.09
8.1.240.0050.00522.06
8.1.230.0120.00018.97
8.1.220.0030.00617.74
8.1.210.0090.00018.77
8.1.200.0030.00617.48
8.1.190.0000.00917.38
8.1.180.0050.00518.10
8.1.170.0080.00018.67
8.1.160.0040.00421.95
8.1.150.0060.00318.89
8.1.140.0060.00317.50
8.1.130.0040.00417.87
8.1.120.0000.00817.54
8.1.110.0060.00317.50
8.1.100.0040.00417.50
8.1.90.0040.00817.52
8.1.80.0040.00417.41
8.1.70.0000.00817.46
8.1.60.0000.00917.60
8.1.50.0040.00417.59
8.1.40.0030.00517.42
8.1.30.0030.00617.73
8.1.20.0000.00817.64
8.1.10.0040.00417.66
8.1.00.0030.00517.48
8.0.300.0000.00818.77
8.0.290.0000.00816.60
8.0.280.0040.00418.48
8.0.270.0030.00616.77
8.0.260.0000.00717.18
8.0.250.0000.00817.04
8.0.240.0060.00316.93
8.0.230.0000.00716.91
8.0.220.0000.00816.94
8.0.210.0000.00816.94
8.0.200.0040.00416.97
8.0.190.0000.00917.05
8.0.180.0050.00316.91
8.0.170.0080.00316.97
8.0.160.0050.00316.96
8.0.150.0060.00316.93
8.0.140.0000.00816.95
8.0.130.0030.00313.30
8.0.120.0080.00016.91
8.0.110.0030.00616.96
8.0.100.0000.00816.90
8.0.90.0040.00416.71
8.0.80.0030.01416.97
8.0.70.0000.00816.88
8.0.60.0060.00316.93
8.0.50.0030.00616.80
8.0.30.0190.00817.04
8.0.20.0140.00917.40
8.0.10.0040.00416.93
8.0.00.0160.00516.81
7.4.330.0060.00015.09
7.4.320.0070.00016.52
7.4.300.0070.00016.53
7.4.290.0070.00016.59
7.4.280.0040.00416.64
7.4.270.0040.00416.45
7.4.260.0040.00416.65
7.4.250.0000.00816.55
7.4.240.0020.00616.53
7.4.230.0040.00416.54
7.4.220.0110.01116.64
7.4.210.0100.00616.58
7.4.200.0070.00016.62
7.4.160.0170.01016.69
7.4.150.0120.01217.40
7.4.140.0150.00617.86
7.4.130.0130.01116.56
7.4.120.0110.01316.60
7.4.110.0180.01116.82
7.4.100.0200.01016.56
7.4.90.0090.01216.55
7.4.80.0150.01219.39
7.4.70.0120.00916.65
7.4.60.0040.01816.81
7.4.50.0000.00716.67
7.4.40.0000.02016.54
7.4.30.0080.01116.43
7.4.00.0090.00915.11
7.3.330.0060.00313.39
7.3.320.0030.00313.26
7.3.310.0040.00416.46
7.3.300.0030.00516.37
7.3.290.0100.00716.43
7.3.280.0030.01616.39
7.3.270.0030.01917.40
7.3.260.0040.01916.45
7.3.250.0130.00916.48
7.3.240.0190.00416.44
7.3.230.0100.01016.54
7.3.210.0150.00916.35
7.3.200.0110.01119.39
7.3.190.0150.00916.38
7.3.180.0080.01216.45
7.3.170.0060.02316.43
7.3.160.0050.01316.52
7.3.120.0040.01515.14
7.2.330.0130.01016.49
7.2.320.0040.01916.73
7.2.310.0070.01316.75
7.2.300.0200.00316.54
7.2.290.0070.01416.52
7.2.60.0110.00416.91
7.2.00.0110.00419.48
7.1.200.0060.00815.82
7.1.100.0110.01417.83
7.1.70.0050.00517.23
7.1.60.0170.01019.25
7.1.50.0140.01416.85
7.1.00.0030.07322.27
7.0.200.0040.00816.85
7.0.140.0030.07722.09
7.0.60.0130.07719.93
7.0.50.0100.08018.01
7.0.40.0070.07320.31
7.0.30.0300.08020.08
7.0.20.0070.05020.09
7.0.10.0030.06720.07
7.0.00.0070.09320.13
5.6.280.0100.06721.03
5.6.210.0070.06720.60
5.6.200.0000.05318.18
5.6.190.0200.07020.41
5.6.180.0270.05020.50
5.6.170.0270.07720.58
5.6.160.0030.04720.50
5.6.150.0130.07318.20
5.6.140.0070.08318.19
5.6.130.0030.08018.24
5.6.120.0100.07720.93
5.6.110.0000.10021.17
5.6.100.0130.06021.02
5.6.90.0100.07721.16
5.6.80.0100.06020.42
5.5.350.0270.07720.43
5.5.340.0000.08018.09
5.5.330.0100.07320.41
5.5.320.0130.05020.39
5.5.310.0370.07320.30
5.5.300.0070.07717.98
5.5.290.0070.07717.97
5.5.280.0070.06020.73
5.5.270.0130.05020.81
5.5.260.0070.05320.85
5.5.250.0030.07720.80
5.5.240.0170.06320.29
5.4.450.0730.05719.64
5.4.440.0870.06019.30
5.4.430.0670.06319.34
5.4.420.0970.06319.46
5.4.410.0070.05318.66
5.4.400.0300.06718.77
5.4.390.0430.05718.54
5.4.380.0070.07018.81
5.4.370.0100.05318.78
5.4.360.0100.05318.77
5.4.350.0100.05512.04
5.4.340.0030.03812.04
5.4.320.0070.04712.53
5.4.310.0080.03912.53
5.4.300.0030.04212.53
5.4.290.0080.04112.53
5.4.280.0080.03412.42
5.4.270.0110.03312.42
5.4.260.0050.03912.42
5.4.250.0050.04012.42
5.4.240.0060.03912.42
5.4.230.0040.04912.41
5.4.220.0070.03712.41
5.4.210.0070.03412.41
5.4.200.0070.03612.41
5.4.190.0070.03512.41
5.4.180.0020.04112.41
5.4.170.0050.03812.41
5.4.160.0070.03512.41
5.4.150.0080.03412.40
5.4.140.0020.04212.09
5.4.130.0040.03912.08
5.4.120.0050.03712.04
5.4.110.0050.03712.04
5.4.100.0060.03412.04
5.4.90.0050.04212.04
5.4.80.0080.03812.04
5.4.70.0050.03712.04
5.4.60.0040.03612.03
5.4.50.0060.03412.04
5.4.40.0020.03812.02
5.4.30.0050.03612.02
5.4.20.0070.03412.02
5.4.10.0070.03412.02
5.4.00.0030.03911.51
5.3.290.0040.04112.80
5.3.280.0040.04012.71
5.3.270.0090.03612.73
5.3.260.0070.03812.72
5.3.250.0050.03912.72
5.3.240.0090.04512.72
5.3.230.0060.03912.71
5.3.220.0070.03912.68
5.3.210.0060.03812.68
5.3.200.0060.03612.68
5.3.190.0090.03512.68
5.3.180.0050.03712.68
5.3.170.0040.03812.67
5.3.160.0080.03712.67
5.3.150.0080.03512.67
5.3.140.0050.03812.66
5.3.130.0060.04512.66
5.3.120.0050.03912.66
5.3.110.0080.03712.65
5.3.100.0070.03612.13
5.3.90.0060.04012.11
5.3.80.0080.03512.10
5.3.70.0100.03312.10
5.3.60.0080.03412.09
5.3.50.0050.03712.03
5.3.40.0130.03612.03
5.3.30.0130.02811.99
5.3.20.0030.03811.77
5.3.10.0100.04111.74
5.3.00.0080.04011.73
5.2.170.0070.0289.22
5.2.160.0050.0329.22
5.2.150.0040.0359.23
5.2.140.0020.0339.22
5.2.130.0060.0289.18
5.2.120.0070.0279.18
5.2.110.0050.0299.19
5.2.100.0060.0289.19
5.2.90.0060.0399.19
5.2.80.0060.0409.17
5.2.70.0060.0409.18
5.2.60.0070.0399.14
5.2.50.0040.0359.10
5.2.40.0030.0319.08
5.2.30.0050.0309.05
5.2.20.0020.0319.04
5.2.10.0040.0298.95
5.2.00.0030.0318.81
5.1.60.0030.0258.10
5.1.50.0090.0218.09
5.1.40.0050.0238.07
5.1.30.0020.0288.43
5.1.20.0090.0328.44
5.1.10.0060.0308.17
5.1.00.0030.0278.17
5.0.50.0050.0196.65
5.0.40.0020.0206.52
5.0.30.0050.0306.32
5.0.20.0020.0216.29
5.0.10.0060.0176.27
5.0.00.0030.0316.26
4.4.90.0010.0174.78
4.4.80.0030.0194.75
4.4.70.0030.0164.75
4.4.60.0030.0154.75
4.4.50.0040.0144.77
4.4.40.0050.0254.71
4.4.30.0060.0194.76
4.4.20.0030.0164.85
4.4.10.0030.0154.85
4.4.00.0020.0264.76
4.3.110.0020.0164.67
4.3.100.0020.0164.67
4.3.90.0050.0124.63
4.3.80.0010.0274.59
4.3.70.0000.0184.63
4.3.60.0040.0154.63
4.3.50.0050.0154.63
4.3.40.0030.0254.53
4.3.30.0010.0213.30
4.3.20.0010.0223.28
4.3.10.0030.0183.24
4.3.00.0100.0277.13

preferences:
50.33 ms | 400 KiB | 5 Q