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/compact_no_this.phpt
2016-09-01 13:01:38 +02:00

26 lines
343 B
PHP

--TEST--
compact() without object context
--FILE--
<?php
var_dump(
(new class {
function test(){
return (static function(){ return compact('this'); })();
}
})->test()
);
var_dump(compact('this'));
var_dump((function(){ return compact('this'); })());
?>
--EXPECT--
array(0) {
}
array(0) {
}
array(0) {
}