TypePHP 编译器 https://swoole.com/aot/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

31 lines
501 B

--TEST--
array_column() respects property visibility
--FILE--
<?php
class Test
{
private $prop;
public function __construct($value)
{
$this->prop = $value;
}
public function __isset($name): bool
{
return true;
}
public function __get($name)
{
return "__get({$this->prop})";
}
}
function main()
{
$arr = [new Test("foobar")];
var_dump(array_column($arr, "prop"));
}
?>
--EXPECT--
array(1) {
[0]=>
string(13) "__get(foobar)"
}