|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #80804 debug_zval_dump example does not compile (Parse error: syntax error is shown)
Submitted: 2021-02-26 16:42 UTC Modified: 2021-03-03 14:00 UTC
From: forkik at gmail dot com Assigned: cmb (profile)
Status: Duplicate Package: *General Issues
PHP Version: 8.0Git-2021-02-26 (Git) OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
19 - 3 = ?
Subscribe to this entry?

 [2021-02-26 16:42 UTC] forkik at gmail dot com
From manual page:

Test script:
$var1 = 'Hello World';
$var2 = '';

$var2 =& $var1;


Actual result:
Parse error: syntax error, unexpected token "&" in /tmp/tester.php on line 7 

Checked at with PHP versions: 8.0.0 and 7.4.8


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-02-26 16:47 UTC]
-Summary: Example does not compile (Parse error: syntax error is shown) +Summary: debug_zval_dump example does not compile (Parse error: syntax error is shown) -Package: Documentation problem +Package: *General Issues
 [2021-02-26 16:47 UTC]
As pointed out in the comments, the example requires call-time pass-by-reference which was removed from PHP a while back.

The unfortunate truth is that debug_zval_dump is essentially useless now...
 [2021-02-27 21:22 UTC]
 [2021-03-03 14:00 UTC]
-Status: Open +Status: Duplicate -Assigned To: +Assigned To: cmb
 [2021-03-03 14:00 UTC]
Duplicate of bug #72283.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Oct 21 19:03:35 2021 UTC