1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 01:18:19 +02:00

Add 'import const' example.

This commit is contained in:
Sebastian Bergmann
2002-03-08 11:36:56 +00:00
parent 27242a7a46
commit 2f010abe51
+11
View File
@@ -301,6 +301,17 @@ Changes in the Zend Engine 2.0
func2();
?>
Example:
<?php
class MyOuterClass {
const Hello = "Hello, World\n";
}
import const Hello from MyOuterClass;
print Hello;
?>
Old code that does not take advantage of namespaces will run
without modifications.