1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/Zend/tests/varSyntax/magic_const_deref.phpt
2020-07-10 21:05:28 +02:00

25 lines
411 B
PHP

--TEST--
Dereferencing of magic constants
--FILE--
<?php
function test() {
var_dump(__FUNCTION__[0]);
var_dump(__FUNCTION__->prop);
try {
__FUNCTION__->method();
} catch (Error $e) {
echo $e->getMessage(), "\n";
}
}
test();
?>
--EXPECTF--
string(1) "t"
Warning: Attempt to read property "prop" on string in %s on line %d
NULL
Call to a member function method() on string