Skip to content

Assertion failure with array_find when references are involved #15982

Closed
@YuanchengJiang

Description

@YuanchengJiang

Description

The following code:

<?php
$a = array('foo' => 'original.foo');
$ref = &$a;
extract($a, EXTR_REFS);
$fusion = $ref;
var_dump(array_find($fusion, function ($value, $key) {
return true;
}));

Resulted in this output:

php: Zend/zend_vm_execute.h:1361: int ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER(zend_execute_data *): Assertion `(call->func->common.fn_flags & (1 << 12)) ? (zval_get_type(&(*(ret))) == 10) : !(zval_get_type(&(*(ret))) == 10)' failed.
Aborted (core dumped)

PHP Version

PHP 8.4.0-dev

Operating System

ubuntu 22.04

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions