mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
13 lines
206 B
Plaintext
13 lines
206 B
Plaintext
|
--TEST--
|
||
|
$this as global variable
|
||
|
--FILE--
|
||
|
<?php
|
||
|
function foo() {
|
||
|
global $this;
|
||
|
var_dump($this);
|
||
|
}
|
||
|
foo();
|
||
|
?>
|
||
|
--EXPECTF--
|
||
|
Fatal error: Cannot use $this as global variable in %sthis_as_global.php on line 3
|