<?php
class Image {
public $a="s";
};
class Headed extends Image { };
class Dimension {
function __construct(Imsage $image)
{
var_dump($image);
}
};
$h = new Headed;
$d = new Dimension($h);
Fatal error: Uncaught TypeError: Dimension::__construct(): Argument #1 ($image) must be of type Imsage, Headed given, called in /in/crNfE on line 17 and defined in /in/crNfE:10
Stack trace:
#0 /in/crNfE(17): Dimension->__construct(Object(Headed))
#1 {main}
thrown in /in/crNfE on line 10
Process exited with code 255.
Fatal error: Uncaught TypeError: Argument 1 passed to Dimension::__construct() must be an instance of Imsage, instance of Headed given, called in /in/crNfE on line 17 and defined in /in/crNfE:10
Stack trace:
#0 /in/crNfE(17): Dimension->__construct(Object(Headed))
#1 {main}
thrown in /in/crNfE on line 10
Process exited with code 255.
Catchable fatal error: Argument 1 passed to Dimension::__construct() must be an instance of Imsage, instance of Headed given, called in /in/crNfE on line 17 and defined in /in/crNfE on line 10
Process exited with code 255.
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6
Fatal error: Class 'Imsage' not found in /in/crNfE on line 10
Process exited with code 255.
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/crNfE on line 4
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/crNfE on line 4
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/crNfE on line 4
Process exited with code 255.