@ 2015-09-19T07:11:51Z <?php
class A {
public function b(DateTime $c) {
print_r($c);
}
}
$a = new A();
try {
$a->b("");
} catch (TypeError $e) {
echo $e->getMessage();
}
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 8.0.0 - 8.0.30 , 8.1.0 - 8.1.27 , 8.2.0 - 8.2.17 , 8.3.0 - 8.3.4 A::b(): Argument #1 ($c) must be of type DateTime, string given, called in /in/QlpWm on line 13 Output for 7.0.0 - 7.0.33 , 7.1.0 - 7.1.33 , 7.2.0 - 7.2.33 , 7.3.0 - 7.3.33 , 7.4.0 - 7.4.33 Argument 1 passed to A::b() must be an instance of DateTime, string given, called in /in/QlpWm on line 13 Output for 5.4.0 - 5.4.45 , 5.5.0 - 5.5.38 , 5.6.0 - 5.6.40 Catchable fatal error: Argument 1 passed to A::b() must be an instance of DateTime, string given, called in /in/QlpWm on line 13 and defined in /in/QlpWm on line 5
Process exited with code 255 . preferences:dark mode live preview
332.21 ms | 402 KiB | 372 Q