3v4l.org

run code in 300+ PHP versions simultaneously
<?php class PhpNw15Conference { } /** * Class Controller */ class Controller { /** * @return array */ public function __construct(PhpNw15Conference $conference) { $this->conference = $conference; } } /** Controller Resolver **/ $controller = 'Controller'; // Retrieved from URL + YAML config $action = 'speakersAction'; // Retrieved from URL + Yaml config $params = array(); // Retrieved from GET / POST parameters $reflector = new \ReflectionClass('Controller'); var_dump($reflector->getConstructor()->getParameters());
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.7
array(1) { [0]=> object(ReflectionParameter)#3 (1) { ["name"]=> string(10) "conference" } }
Output for 5.4.2 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.21
array(1) { [0]=> &object(ReflectionParameter)#3 (1) { ["name"]=> string(10) "conference" } }

preferences:
189.02 ms | 402 KiB | 227 Q