You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Dmitry Stogov c4b5d9e572 Disabling declaration of class which name conflicts with import. 19 years ago
TSRM Fixed bug #42027 is_file() / is_dir() matches file/dirnames with wildcard char or trailing slash 19 years ago
Zend Disabling declaration of class which name conflicts with import. 19 years ago
build MFB:- Updated bundled shtool to 2.0.6 and added "platform" command in it. 20 years ago
ext - Moved mysqnd to it's own directory: It is sort of an extension itself. 19 years ago
main Fixed EOF handling in case of reading from file opened in write only mode. 19 years ago
netware Bump year. 20 years ago
sapi fix win32 build 19 years ago
scripts fix --with-php-config option 19 years ago
tests Fixed bug #40757 (get_object_vars get nothing in child class) 19 years ago
win32 - Allow the use of a user defined template.rc file to override the 19 years ago
.gdbinit - Add print_htptr, print_htstr 19 years ago
CODING_STANDARDS \# Damn ! 21 years ago
CREDITS Let's pretend this is up-to-date now 25 years ago
ChangeLog ChangeLog update 19 years ago
ChangeLog.1999.gz * separated and compressed changelogs from 1999 and 2000 26 years ago
ChangeLog.2000.gz * separated and compressed changelogs from 1999 and 2000 26 years ago
ChangeLog.2001.gz * archive the 2001 changelog 25 years ago
ChangeLog.2002.gz rotate changelog 24 years ago
ChangeLog.2003.gz - Compress 2003 changelog 23 years ago
ChangeLog.2004.gz - Compressed 2004 Changelog 22 years ago
ChangeLog.2005.gz 2005 -> 2006 21 years ago
EXTENSIONS update ext/gmp status and maintainers 20 years ago
INSTALL Rename php5 module to php6. Remove version number from 20 years ago
LICENSE 2005 -> 2006 21 years ago
Makefile.frag MFB 19 years ago
Makefile.gcov MFB 20 years ago
Makefile.global Fixed "make test" 19 years ago
NEWS - These functions where MFHd >1 year ago 19 years ago
README.CVS-RULES - Mention [DOC] tag in the README 19 years ago
README.EXTENSIONS * zend_module_entry change: apino, debug and zts are moved first, 25 years ago
README.EXT_SKEL ok, re-adding this mostly un-maintained awk/sed/sh nightmare for now ... 23 years ago
README.NEW-OUTPUT-API - revise output handler alias API 20 years ago
README.PARAMETER_PARSING_API - Fix f 19 years ago
README.PEAR - if questions, rtfm 21 years ago
README.PHP4-TO-PHP5-THIN-CHANGES new incompatibilities. maybe someone from the doc group will update the 22 years ago
README.QNX PHP 4.0 28 years ago
README.SELF-CONTAINED-EXTENSIONS Improve the wording in this paragraph. 24 years ago
README.STREAMS Added notes about locking functions. 24 years ago
README.SUBMITTING_PATCH Typos found by Petras Kudaras. 23 years ago
README.TESTING typo 23 years ago
README.TESTING2 many new enhancements to run-tests that allow for testing cgi and other 24 years ago
README.UNICODE Update with rewrites by me and Evan G. 20 years ago
README.UNICODE-UPGRADES - Nicer version 20 years ago
README.UNIX-BUILD-SYSTEM Update documentation for PHP 5. 23 years ago
README.UPDATING_TO_PHP6 - Use the right variable name 19 years ago
README.WIN32-BUILD-SYSTEM Now that it has matured somewhat, don't discourage questions about it 23 years ago
README.Zeus - Change from PHP5 -> PHP 5 23 years ago
README.input_filter - Fix docs 21 years ago
README.namespaces add announcement copy as README for easier reference 19 years ago
TODO *** empty log message *** 21 years ago
TODO-5.1 Update TODO. 21 years ago
TODO-PHP5 Remove finished tasks 22 years ago
acconfig.h.in Wipe out acconfig.h.in and rewrite some checks to use PHP_ARG_ENABLE. 26 years ago
acinclude.m4 - Moved mysqnd to it's own directory: It is sort of an extension itself. 19 years ago
buildconf - Remove unused lines 21 years ago
buildconf.bat Add new (optional!) win32 build infrastructure. 23 years ago
config.guess MFB51: Update bundled libtool to version 1.5.20 21 years ago
config.sub MFB51: Update bundled libtool to version 1.5.20 21 years ago
configure.in - Moved the old regex functions to it's own extension: ereg 19 years ago
cvsclean Renaming cvsclean target; IRIX make seems to ignore .PHONY 23 years ago
cvsclean.bat "Real" cvsclean, works as the unix version does 23 years ago
footer consistent with the used style 24 years ago
genfiles More files to have #line directives stripped for release 21 years ago
header bump year and license version 21 years ago
ltmain.sh MFB51: Update bundled libtool to version 1.5.20 21 years ago
makedist Download pear phar file when making a distribution package 20 years ago
makerpm Rename php5 module to php6. Remove version number from 20 years ago
php.gif change these in HEAD too 21 years ago
php.ini-dist - Changed "display_errors" php.ini option to accept "stderr" as value which 19 years ago
php.ini-recommended - Changed "display_errors" php.ini option to accept "stderr" as value which 19 years ago
php5.spec.in - Renamed all *php4* files to *php5*, changed all php4/PHP4 to php5/PHP5 23 years ago
run-tests.php Fixed "make test" 19 years ago
server-tests-config.php - Fix filename 21 years ago
server-tests.php MFB 19 years ago
snapshot Integration of -ng changes. Changes: 27 years ago
stamp-h.in # Fix ColorResolve bogosity 27 years ago
stub.c Add newline. Recent GCC snapshots segfault, if the input file is completely 26 years ago
unicode-gotchas.txt Add note about md5(). 21 years ago
unicode-issues.txt Unicode support. 21 years ago
unicode-progress.txt - Update unicode progress on SPL, looks like nearly done, actually all is 20 years ago
unicode-todo.txt *** empty log message *** 20 years ago

README.namespaces

Main assumption of the model is that the problem that we are to solve is the
problem of the very long class names in PHP libraries. We would not attempt
to take autoloader's job or create packaging model - only make names
manageable.

Namespaces are defined the following way:

Zend/DB/Connection.php:
<?php
namespace Zend::DB;

class Connection {
}

function connect() {
}
?>

Namespace definition does the following:
All class and function names inside are automatically prefixed with
namespace name. Inside namespace, local name always takes precedence over
global name. It is possible to use the same namespace in several PHP files.
The namespace declaration statement must be the very first statement in
file.

Every class and function from namespace can be referred to by the full name
- e.g. Zend::DB::Connection or Zend::DB::connect - at any time.

<?php
require 'Zend/Db/Connection.php';
$x = new Zend::DB::Connection;
Zend::DB::connect();
?>

Namespace or class name can be imported:

<?php
require 'Zend/Db/Connection.php';
import Zend::DB;
import Zend::DB::Connection as DbConnection;
$x = new Zend::DB::Connection();
$y = new DB::connection();
$z = new DbConnection();
DB::connect();
?>

import statement only defines name aliasing. It may create name alias for
namespace or class. The simple form of statement "import A::B::C::D;" is
equivalent to "import A::B::C::D as D;". Import statement can be used at any
time in global scope (not inside function/class) and takes effect from the
point of definition down to the end of file. It is recommended however to
place imports at the beginning of the file. Import statements have effect
only on file where they are written.

The special "empty" namespace (:: prefix) is useful as explicit global
namespace qualification. All class and function names started from ::
interpreted as global. <?php namespace A::B::C;

$con = ::mysql_connect(...);
?>

A special constant __NAMESPACE__ indicates the current namespace. It can be
used to construct fully-qualified names to pass them as callbacks.

<?php
namespace A::B::C;

function foo() {
}

set_error_handler(__NAMESPACE__ . "::foo");
?>

In global namespace __NAMESPACE__ constant has value of empty string.

Names inside namespace are resolved according to the following rules.

1) all qualified names are translated during compilation according to
current import rules. So if we have "import A::B::C;" and then "C::D::e();"
it is translated to "A::B::C::D::e()"
2) unqualified class names translated during compilation according to
current import rules. So if we have "import A::B::C;" and then "new C();" it
is translated to "new A::B::C()"

3) calls to unqualified functions that are defined in current namespace
interpreted as calls to corresponding functions
4) calls to unqualified functions that are not defined in current namespace
are resolved in run-time. The call to function foo() inside namespace (A::B)
first tries to find and call function from current namespace A::B::foo() and
if it doesn't exist PHP tries to call internal function foo(). Note that
using foo() in namespace you can call only internal PHP functions, however
using ::foo() you are able to call any function from global namespace.
5) unqualified class names are resolved at run-time. E.q. "new Exception()"
first tries to use (end even __autoload()) class from current namespace and
in case of failure uses internal PHP class. Note that using "new A" in
namespace you can call only create internal PHP class, however using "new
::A" you are able to create any class from global namespace
6) Calls to qualified functions are resolved at run-time. Call to
"A::B::foo()" first tries to call function foo() from namespace "A::B", then
it tries to find class "A::B (__autoload() it if necessary) and call its
static function foo()
7) qualified class names are interpreted as class from corresponding
namespace. So "new A::B::C()" creates class "C" from namespace "A::B".