<?php
class Foo {}
class Bar { public function __construct($name){} }
$fooRefl = new \ReflectionClass('Foo');
$barRefl = new \ReflectionClass('Bar');
var_dump($fooRefl->getConstructor());
var_dump($barRefl->getConstructor());
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/KoqT7 on line 6
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/KoqT7 on line 7
NULL
object(ReflectionMethod)#3 (2) {
["name"]=>
string(11) "__construct"
["class"]=>
string(3) "Bar"
}
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/KoqT7 on line 5
Process exited with code 255.
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/KoqT7 on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/KoqT7 on line 5
Process exited with code 255.