Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions en/core-libraries/global-constants-and-functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -137,11 +141,19 @@ such as debugging and translating content.

.. 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 ``<pre>`` 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 ``<pre>`` tags around the output.

Expand Down