This is an error 404
There are `0` results
preferences:
170.54 ms | 1399 KiB | 7 Q<?php
namespace foo{
echo "1-Inside namespace foo \n";
use My\Full\Classname as Another;
use ArrayObject; // importing a global class
echo "2-After using ArrayObject line: ".__LINE__."\n";
class Another {
public function cname() {
echo "line".__LINE__."Method".__METHOD__."\n";
}
static function method(){echo "line".__LINE__."Method: ".__METHOD__."\n";}
}
//This line below is Not working.
$obj1 = new namespace\Another; // instantiates object of foo\Another
echo "3-After namespace\Another object line: ".__LINE__."\n";
//This line below is Not working.
echo "4-".$obj1->method()."\n";
//This line below is Not working.
$obj2 = new Another; // instantiates object of class My\Full\Classname
echo "5-After Another object line: ".__LINE__."\n";
//This line below is Not working.
echo "6-".$obj2->method()."\n";
echo "7-After Another object line: ".__LINE__."\n";
//This line below is Not working.
$a = new ArrayObject(array(1)); // instantiates object of ArrayObject
echo "8-After ArrayObject line: ".__LINE__."\n";
}
namespace My\Full{
class Classname{
public function cname() {
echo "line".__LINE__."Method".__METHOD__."\n";
}
static function method(){echo "line".__LINE__."Method: ".__METHOD__."\n";} } }