-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed as not planned
Labels
Description
Description
The following code:
<?php
namespace Foo;
preg_replace('/foo/', '', '');
echo "*** Testing arsort() : object functionality ***\n";
// class declaration for integer objects
class for_integer_arsort
{
public $class_value;
// initializing object member value
function __construct($value){
$this->class_value = $value;var_dump($this);
}
}
// class declaration for string objects
class for_string_arsort
{
public $class_value;
// initializing object member value
function __construct($value){
$this->class_value = $value;var_dump($this);
}
// return string value
function __tostring() {
return (string)$this->value;var_dump($this);
}
}
// array of integer objects
$unsorted_int_obj = array (
1 => new for_integer_arsort(11), 2 => new for_integer_arsort(66),
3 => new for_integer_arsort(23), 4 => new for_integer_arsort(-5),
5 => new for_integer_arsort(0.001), 6 => new for_integer_arsort(0)
);
Resulted in this output (JIT 1101):
/Zend/zend_compile.c:1360: do_bind_class: Assertion `ce' failed.
Aborted (core dumped)
But I expected this output instead (non-JIT):
*** Testing arsort() : object functionality ***
object(Foo\for_integer_arsort)#1 (1) {
["class_value"]=>
int(11)
}
object(Foo\for_integer_arsort)#2 (1) {
["class_value"]=>
int(66)
}
object(Foo\for_integer_arsort)#3 (1) {
["class_value"]=>
int(23)
}
object(Foo\for_integer_arsort)#4 (1) {
["class_value"]=>
int(-5)
}
object(Foo\for_integer_arsort)#5 (1) {
["class_value"]=>
float(0.001)
}
object(Foo\for_integer_arsort)#6 (1) {
["class_value"]=>
int(0)
}
PHP Version
nightly
Operating System
ubuntu 22.04