3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); trait ControlHelper { public const CONTROL_TEST = 'test'; public function getControl(string $name = self::CONTROL_TEST): void { } } abstract class BasePresenter { use ControlHelper; } class Presenter extends BasePresenter { } $method = new ReflectionMethod(Presenter::class, 'getControl'); foreach ($method->getParameters() as $param) { $tmp = $param->getDefaultValue(); var_dump($tmp); }

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.4.140.0100.01017.52
8.4.130.0110.00818.76
8.4.120.0090.00824.00
8.4.110.0080.01018.02
8.4.100.0040.00418.93
8.4.90.0160.00420.73
8.4.80.0130.00820.31
8.4.70.0090.01117.95
8.4.60.0150.00518.98
8.4.50.0040.00418.79
8.4.40.0160.00317.49
8.4.30.0170.00318.73
8.4.20.0100.01021.30
8.4.10.0090.00919.32
8.3.270.0120.00716.65
8.3.260.0150.00516.58
8.3.250.0120.00718.84
8.3.240.0110.00816.94
8.3.230.0110.00816.23
8.3.220.0130.00518.95
8.3.210.0050.00318.34
8.3.200.0050.00416.59
8.3.190.0130.00617.25
8.3.180.0030.00417.20
8.3.170.0090.00919.02
8.3.160.0110.00717.10
8.3.150.0080.00016.99
8.3.140.0000.00818.97
8.3.130.0000.00818.34
8.3.120.0090.00018.87
8.3.110.0060.00922.58
8.3.100.0050.00322.58
8.3.90.0040.00422.58
8.3.70.0180.00517.11
8.3.50.0030.00622.58
8.2.290.0060.00320.24
8.2.280.0140.00518.47
8.2.270.0120.00617.05
8.2.260.0070.00716.91
8.2.250.0150.00418.52
8.2.240.0030.00620.62
8.2.230.0100.01022.58
8.2.220.0050.00522.58
8.2.210.0080.00022.58
8.1.330.0110.00721.75
8.1.320.0040.00416.34
8.1.310.0080.00018.55
8.1.300.0090.00019.73

preferences:
28.31 ms | 403 KiB | 5 Q