Re: Simple Namespace Proposal

From: Date: Sun, 15 Jul 2007 16:20:31 +0000
Subject: Re: Simple Namespace Proposal
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-30951@lists.php.net to get a copy of this message
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Arpad Ray wrote: > I've attached some phpt files to test this, but here's a simple > illustration: > > foo.php: > <?php > namespace foo; > function foobar() { } > class Foobaz { } > ?> > > bar.php: > <?php > import foo; > foobar(); // error > new Foobaz; // error > foo::foobar(); // ok > new foo::Foobaz; // ok > > import foo::foobar; > import foo::Foobaz; > foobar(); // error > new Foobaz; // ok > > import foo::foobar as foobar2; > foobar2(); // error > ?> Is this what other languages try to solve with: import foo::*; (untested, I don't know if this is implemented) ? Maybe .., - - Markus -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGmklP1nS0RcInK9ARAiv1AKC8JuXe3fVBy1VGv3chqjMImKKbJgCgn5NW /V3kGzqXYC08d8yJ6nbpYv0= =5sq0 -----END PGP SIGNATURE-----

« previous php.internals (#30951) next »