Skip to content

Assertion failure in Zend/zend_operators.c:1045 #16185

@YuanchengJiang

Description

@YuanchengJiang

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions