- Output for 7.0.0 - 7.0.25, 7.1.0 - 7.1.11
- Fatal error: Constant expression contains invalid operations in /in/ePI2d on line 12
Process exited with code 255.
<?php
class Person {
private $string;
public function __constructor(string $string)
{
$this->string = $string;
}
}
function test_types(Person $person = new Person("string")) {
if ($person instanceof Person) {
echo "TRUE";
}
}