From 285c8b2b89440bdb4b2178ed960411c8a8314de0 Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Thu, 23 Oct 2014 19:53:34 +0000 Subject: [PATCH] Clarify what types of values can be given to declare directives. Fixes doc bug #68177 (declare() + named constant = "Cannot convert to ordinal value"). git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@335128 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/control-structures/declare.xml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/language/control-structures/declare.xml b/language/control-structures/declare.xml index 4c6e2fd13c..f1f7948e4c 100644 --- a/language/control-structures/declare.xml +++ b/language/control-structures/declare.xml @@ -36,6 +36,25 @@ declare (directive) The encoding directive was added in PHP 5.3.0 + + As directives are handled as the file is being compiled, only literals may + be given as directive values. Variables and constants cannot be used. To + illustrate: + + + +]]> + + + The statement part of the declare block will be executed - how