Description
Referenced RFC #13455
Positive Case
<?phpclass FirstExample
{
publicstring$value = 'default' {
get => $this->value;
}
}
echonewFirstExample()->value; // "example"Negative Case
<?phptrait TraitWithProperty
{
publicstring$value = 'default' {
get => $this->value;
}
}
class SecondExample
{
use TraitWithProperty;
}
echonewSecondExample()->value;
// Fatal error: Uncaught Error: Maximum call stack size of 8339456 bytes (zend.max_allowed_stack_size - zend.reserved_stack_size) reached. Infinite recursion? in /test.php:15// Stack trace:// #0 /test.php(15): SecondExample->$value::get()// #1 ....@iluuu1994 I think it makes sense to mention you as the maintainer of the feature. It seems like this is not a duplicate issue, a known problem?
PHP Version
PHP 8.4-alpha2
Operating System
No response
Description
Referenced RFC #13455
Positive Case
Negative Case
@iluuu1994 I think it makes sense to mention you as the maintainer of the feature. It seems like this is not a duplicate issue, a known problem?
PHP Version
PHP 8.4-alpha2
Operating System
No response