diff options
author | Sebastian Bergmann <sebastian@php.net> | 2002-03-02 22:24:46 +0000 |
---|---|---|
committer | Sebastian Bergmann <sebastian@php.net> | 2002-03-02 22:24:46 +0000 |
commit | 3b7435fc51b2a2627c09ee5717271722bb045645 (patch) | |
tree | 1cba19e89f2ff401dd6e14e87068295c6fa0d620 /Zend/ZEND_CHANGES | |
parent | b90d80b58806083ded586da0745f02b38d301819 (diff) | |
download | php-git-3b7435fc51b2a2627c09ee5717271722bb045645.tar.gz |
Add 'import statement' section.
Diffstat (limited to 'Zend/ZEND_CHANGES')
-rw-r--r-- | Zend/ZEND_CHANGES | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Zend/ZEND_CHANGES b/Zend/ZEND_CHANGES index 80f0604eb3..ad60afe092 100644 --- a/Zend/ZEND_CHANGES +++ b/Zend/ZEND_CHANGES @@ -259,6 +259,35 @@ Changes in the Zend Engine 2.0 Old code that does not take advantage of namespaces will run without modifications. + * import statement. + + With the new import statement it is possible to import classes + and methods from other classes (namespaces) to the current scope. + + Example: + + <?php + class MyClass { + function hello() { + print "Hello, World\n"; + } + + class MyClass2 { + function hello() { + print "Hello, World in MyClass2\n"; + } + } + } + + import function hello, class MyClass2 from MyClass; + + MyClass2::hello(); + hello(); + ?> + + Old code that has no user-defined function 'import' will run + without modifications. + * Unified Constructors. The Zend Engine allows developers to declare constructor methods |