added a warning regarding print_r() and selfcontained arrays and objects

output will not terminate in this case as reported in Bug report #3926


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@25045 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Hartmut Holzgraefe 2000-05-25 16:55:28 +00:00
parent 9ecc46f34d
commit b316075991

View file

@ -531,6 +531,16 @@ print_r ($a);
?>
</programlisting>
</informalexample>
</para>
<para>
<warning>
This function will continue forever if given an array or object
that contains a direct or indirect reference to itself or that
contains an array or object on a deepre level that does so.
This is especially true for <literal>print_r($GLOBALS)</literal>,
as <literal>$GLOBALS</literal> is itself a global variable and
contains a reference to itself as such.
</warning>
</para>
</refsect1>
</refentry>