예제 #1
0
<?php 
require_once "vendor/autoload.php";
echo "input: ";
$fp = fopen("php://stdin", "r");
$str = rtrim(fgets($fp, 1024));
$foo = new Foo\Foo();
echo "output: " . $foo->Reverse($str);
예제 #2
0
파일: ns_028.php 프로젝트: badlamer/hhvm
<?php

require "ns_028.inc";
class Foo
{
    function __construct()
    {
        echo "Method - " . __CLASS__ . "::" . __FUNCTION__ . "\n";
    }
    static function Bar()
    {
        echo "Method - " . __CLASS__ . "::" . __FUNCTION__ . "\n";
    }
}
$x = new Foo();
Foo\Bar();
$x = new Foo\Foo();
Foo\Foo::Bar();
\Foo\Bar();