1
0
mirror of https://github.com/php/php-src.git synced 2026-03-25 08:42:29 +01:00
Files
archived-php-src/tests/lang/bug23922.phpt

21 lines
328 B
PHP

--TEST--
Bug #23922 (scope doesn't properly propagate into internal functions)
--FILE--
<?php
class foo
{
public $foo = 1;
function as_string()
{ assert('$this->foo == 1'); }
function as_expr()
{ assert($this->foo == 1); }
}
$foo = new foo();
$foo->as_expr();
$foo->as_string();
?>
--EXPECT--