php-src/Zend/tests/this_as_global.phpt
2020-02-03 22:52:20 +01:00

13 lines
212 B
PHP

--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