Arquivos
hhvm/hphp/test/vm/null_this.php
T
Jordan Delong 363d1bb20f Code move src/ -> hphp/
This change is mostly for FB internal organizational reasons.
Building is not effected beyond the fact that the target now
lands in hphp/hhvm/hhvm rather than src/hhvm/hhvm.
2013-02-11 02:10:41 -08: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";