Well, that is really a consequence of PHP being a scripting language. You can do also sorts of shady things, as long as it makes sense (to the parser) one line to the next. Why you would want to do that, I'm not sure.
On Jun 19, 4:22 pm, ctx2002 <[email protected]> wrote: > Hi all: > > I just discovered this today, after used PHP for 4 years!!! > but i can not find any reference in PHP document. > Any one give me a official PHP doc link? > > <?php > function container() > { > class Item > { > private $val = "this is a item"; > public function showItem() > { > return $this->val; > } > } > > function hello() > { > echo "hello"; > } > > } > > container(); > $obj = new Item(); > echo $obj->showItem(); > > hello(); > ?> --~--~---------~--~----~------------~-------~--~----~ NZ PHP Users Group: http://groups.google.com/group/nzphpug To post, send email to [email protected] To unsubscribe, send email to [email protected] -~----------~----~----~----~------~----~------~--~---
