php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #72283 Invalid example on debug_zval_dump
Submitted: 2016-05-28 17:46 UTC Modified: 2016-12-30 15:32 UTC
From: fernando at null-life dot com Assigned:
Status: Verified Package: Documentation problem
PHP Version: 5.6.22 OS: *
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2016-05-28 17:46 UTC] fernando at null-life dot com
Description:
------------
---
From manual page: http://www.php.net/function.debug-zval-dump
---

First example is invalid now because call-time pass by reference is removed.

Fatal error: Call-time pass-by-reference has been removed in /Users/fmunozs/dev/php-fuzz/phuzzer/x.php on line 7


Test script:
---------------
<?php
$var1 = 'Hello World';
$var2 = '';

$var2 =& $var1;

debug_zval_dump(&$var1);
?>

Expected result:
----------------
Working example

Actual result:
--------------
Fatal error: Call-time pass-by-reference has been removed in /Users/fmunozs/dev/php-fuzz/phuzzer/x.php on line 7


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-12-30 15:32 UTC] cmb@php.net
-Status: Open +Status: Verified
 [2016-12-30 15:32 UTC] cmb@php.net
Not only is the first example invalid as of PHP 5.4.0, but also
the third example is broken as of PHP 7.0.0, and there appear more
issues, see
<http://marc.info/?l=php-internals&m=143778859216287&w=2>ff.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Jun 18 09:01:27 2019 UTC