示例#1
0
文件: 738.php 项目: badlamer/hhvm
<?php

class Foo
{
    static function Bar()
    {
        if (isset($this) && isset($this->bar)) {
            echo "isset\n";
        }
        var_dump($this);
    }
}
Foo::Bar();
$obj = new Foo();
$obj->Bar();
示例#2
0
文件: ns_027.php 项目: badlamer/hhvm
<?php

require "ns_027.inc";
class Foo
{
    function __construct()
    {
        echo __CLASS__, "\n";
    }
    static function Bar()
    {
        echo __CLASS__, "\n";
    }
}
$x = new Foo();
Foo::Bar();
$x = new Foo\Bar\Foo();
Foo\Bar\Foo::Bar();
示例#3
0
<?php

class Foo
{
    function Bar()
    {
        $__this = $this;
        $this = null;
        debug_backtrace();
        $this = $__this;
    }
}
$f = new Foo();
$f->Bar();
echo "OK\n";