1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/ext/standard/tests/array/array_column_property_visibility.phpt
2016-04-16 09:59:01 +02:00

28 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)"
}