mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
17 lines
268 B
PHP
17 lines
268 B
PHP
--TEST--
|
|
instanceof self outside a class
|
|
--FILE--
|
|
<?php
|
|
|
|
$fn = function() {
|
|
try {
|
|
new stdClass instanceof self;
|
|
} catch (Error $e) {
|
|
echo $e->getMessage(), "\n";
|
|
}
|
|
};
|
|
$fn();
|
|
|
|
?>
|
|
--EXPECT--
|
|
Cannot access "self" when no class scope is active
|