From the php documentation,we access global classes like
<?php
namespace A\B\C;
class Exception extends \Exception {}
$a = new Exception('hi'); // $a is an object of class A\B\C\Exception
$b = new \Exception('hi'); // $b is an object of class Exception
$c = new ArrayObject; // fatal error, class A\B\C\ArrayObject not found
?>
However,i am a lost when the doc says that
<?php
$a = new \stdClass;
?>
is functionally equivalent to:
<?php
$a = new stdClass;
?>
here http://php.net/manual/en/language.namespaces.faq.php#language.namespaces.faq.shouldicare
Can someone kindly explain what the doc is saying here.
Thanks.