Closed
Description
Description
The following code:
<?php
class ByRef {
private $_virtualByRef = 'virtualByRef';
}
class ByVal extends ByRef {
public $_virtualByRef {
get {
}
set {
$this->backedUninitialized = $value;
}
}
}
function testByVal($object) {
foreach ($object as $prop => $value) {
echo "$prop => $value\n";
$object->{$prop} = strtoupper($value);
}
}
testByVal(new ByVal);
Resulted in this output:
php: /php-src/Zend/zend_operators.c:1045: __zval_get_string_func: Assertion `0' failed.
Aborted (core dumped)
PHP Version
PHP 8.4.0-dev
Operating System
ubuntu 22.04