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)
5.4.310.0050.03912.53
5.4.300.0080.03912.52
5.4.290.0060.04212.52
5.4.280.0060.03512.42
5.4.270.0060.04412.42
5.4.260.0050.04212.42
5.4.250.0070.04112.42
5.4.240.0080.03312.42
5.4.230.0070.04212.41
5.4.220.0070.03412.41
5.4.210.0080.03812.41
5.4.200.0070.03512.41
5.4.190.0070.03412.41
5.4.180.0050.03812.41
5.4.170.0090.03312.41
5.4.160.0080.03312.41
5.4.150.0000.04112.40
5.4.140.0060.03912.09
5.4.130.0050.03512.08
5.4.120.0050.03512.04
5.4.110.0090.03812.04
5.4.100.0040.03612.04
5.4.90.0070.03512.04
5.4.80.0060.03712.04
5.4.70.0040.03612.04
5.4.60.0080.03312.04
5.4.50.0050.04512.03
5.4.40.0070.04012.02
5.4.30.0050.04112.02
5.4.20.0060.03412.01
5.4.10.0070.04112.02
5.4.00.0050.04211.51
5.3.280.0080.03612.71
5.3.270.0070.04312.72
5.3.260.0100.03712.72
5.3.250.0060.04012.72
5.3.240.0060.04212.72
5.3.230.0080.03812.70
5.3.220.0130.03212.68
5.3.210.0130.03312.68
5.3.200.0040.03912.68
5.3.190.0040.04012.68
5.3.180.0040.03812.68
5.3.170.0040.03812.67
5.3.160.0040.03812.67
5.3.150.0080.03512.68
5.3.140.0020.04012.66
5.3.130.0090.03512.66
5.3.120.0110.03912.66
5.3.110.0060.03712.66
5.3.100.0030.03912.13
5.3.90.0090.03812.11
5.3.80.0040.03812.11
5.3.70.0060.03612.11
5.3.60.0030.04012.09
5.3.50.0060.03512.03
5.3.40.0050.04012.04
5.3.30.0020.03812.00
5.3.20.0050.03611.77
5.3.10.0050.03511.75
5.3.00.0070.03511.73

preferences:
138.86 ms | 1386 KiB | 7 Q