Arquivos
hhvm/hphp/test/quick/null_this.php
T
ptarjan 503f75d08b Rename test directories
These names don't make sense now that we run both suites the same
way.
2013-04-17 09:06:51 -07:00

34 linhas
477 B
PHP

<?php
class a {
public $pub = 'public in a';
function pub() {
echo "Entering a::pub\n";
var_dump($this->pub);
echo "Leaving a::pub\n";
}
}
class x {
public $pub = 'public in x';
function pub() {
echo "Entering x::pub\n";
a::pub();
echo "Leaving x::pub\n";
}
}
function main() {
$a = new a;
$x = new x;
echo "Calling a->pub\n";
$a->pub();
echo "Calling x->pub\n";
$x->pub();
}
echo "Calling main()\n";
main();
echo "Done\n";