note 86420 modified in language.namespaces.using by danbrown

From: Date: Tue, 09 Dec 2008 05:00:22 +0000
Subject: note 86420 modified in language.namespaces.using by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-147935@lists.php.net to get a copy of this message
PHP 5.3.0alpha2 (cli) <?php // namespace MyProject::DB; require 'db.php'; use MyProject::DB; // fine; same as DB:: use MyProject::DB::Connection as DBC; // fine use MyProject::DB as HM; // fine use HM::Connection as DBC2; // class call ends with FATAL!!! $x = new DBC(); // fine $y = new HM::Connection(); // fine $z = new DBC2(); // Fatal error: Class 'HM::Connection' not found ?> --was-- PHP 5.3.0alpha2 (cli) <?php // namespace MyProject::DB; require 'db.php'; use MyProject::DB; // fine; same as DB:: use MyProject::DB::Connection as DBC; // fine use MyProject::DB as HM; // fine use HM::Connection as DBC2; // class call ends with FATAL!!! $x = new DBC(); // fine $y = new HM::Connection(); // fine $z = new DBC2(); // Fatal error: Class 'HM::Connection' not found ?> http://php.net/manual/en/language.namespaces.using.php

« previous php.notes (#147935) next »