diff --git a/en/core-libraries/global-constants-and-functions.rst b/en/core-libraries/global-constants-and-functions.rst index aadb8cb856..b07899ab7f 100644 --- a/en/core-libraries/global-constants-and-functions.rst +++ b/en/core-libraries/global-constants-and-functions.rst @@ -97,6 +97,10 @@ such as debugging and translating content. .. php:function:: debug(mixed $var, boolean $showHtml = null, $showFrom = true) + .. versionadded:: 3.3.0 + Calling this method will return passed ``$var``, so that you can, for instance, + place it in return statements. + If the core ``$debug`` variable is ``true``, ``$var`` is printed out. If ``$showHTML`` is ``true`` or left as ``null``, the data is rendered to be browser-friendly. @@ -104,6 +108,26 @@ such as debugging and translating content. which it was called. Also see :doc:`/development/debugging` +.. php:function:: pr(mixed $var) + + .. versionadded:: 3.3.0 + Calling this method will return passed ``$var``, so that you can, for instance, + place it in return statements. + + Convenience wrapper for ``print_r()``, with the addition of + wrapping ``
`` tags around the output.
+
+.. php:function:: pj(mixed $var)
+
+ .. versionadded:: 3.3.0
+ Calling this method will return passed ``$var``, so that you can, for instance,
+ place it in return statements.
+
+ JSON pretty print convenience function, with the addition of
+ wrapping ```` tags around the output.
+
+ It is meant for debugging the JSON representation of objects and arrays.
+
.. php:function:: env(string $key, string $default = null)
.. versionadded:: 3.1.1
@@ -135,18 +159,6 @@ such as debugging and translating content.
Commonly used like ``list($namespace, $className) = namespaceSplit('Cake\Core\App');``
-.. php:function:: pr(mixed $var)
-
- Convenience wrapper for ``print_r()``, with the addition of
- wrapping ```` tags around the output.
-
-.. php:function:: pj(mixed $var)
-
- JSON pretty print convenience function, with the addition of
- wrapping ```` tags around the output.
-
- It is meant for debugging the JSON representation of objects and arrays.
-
Core Definition Constants
=========================