cvs: phpdoc /en/reference/misc/functions constant.xml

From: Date: Mon, 07 Jan 2008 10:48:52 +0000
Subject: cvs: phpdoc /en/reference/misc/functions constant.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-1000@lists.php.net to get a copy of this message
felipe Mon Jan 7 10:48:52 2008 UTC Modified files: /phpdoc/en/reference/misc/functions constant.xml Log: Add example for interface and class constant http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/misc/functions/constant.xml?r1=1.8&r2=1.9&diff_format=u Index: phpdoc/en/reference/misc/functions/constant.xml diff -u phpdoc/en/reference/misc/functions/constant.xml:1.8 phpdoc/en/reference/misc/functions/constant.xml:1.9 --- phpdoc/en/reference/misc/functions/constant.xml:1.8 Wed Jun 20 22:24:57 2007 +++ phpdoc/en/reference/misc/functions/constant.xml Mon Jan 7 10:48:52 2008 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.8 $ --> +<!-- $Revision: 1.9 $ --> <refentry xml:id="function.constant" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>constant</refname> @@ -65,6 +65,20 @@ echo MAXSIZE; echo constant("MAXSIZE"); // same thing as the previous line + +interface bar { + const test = 'foobar!'; +} + +class foo { + const test = 'foobar!'; +} + +$const = 'test'; + +var_dump(constant('bar::'. $const)); // string(7) "foobar!" +var_dump(constant('foo::'. $const)); // string(7) "foobar!" + ?> ]]> </programlisting>

« previous php.doc.cvs (#1000) next »