mirror of
https://github.com/php/php-src.git
synced 2026-04-22 07:28:09 +02:00
1179686f62
Closes GH-5446 Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
25 lines
411 B
PHP
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
|