php-src/ext/standard/tests/array/array_column_property_visibility.phpt
2016-04-16 09:59:01 +02:00

27 lines
456 B
PHP

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