php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29454 php_check_syntax second argument doesn't work in the right way
Submitted: 2004-07-30 07:26 UTC Modified: 2004-08-18 22:26 UTC
From: et@php.net Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 5CVS-2004-07-30 (dev) OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: et@php.net
New email:
PHP Version: OS:

 

 [2004-07-30 07:26 UTC] et@php.net
Description:
------------
The second argument of php_check_syntax is supposed to be passed by reference. However, you need to specify the reference where the function is called, like php_check_syntax($file, &$error); resulting in

Warning: Call-time pass-by-reference has been deprecated - argument passed by value;  If you would like to pass it by reference, modify the declaration of php_check_syntax().  If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file.  However, future versions may not support this any longer.

Reproduce code:
---------------
php_check_syntax("test.php", $error);

Expected result:
----------------
errorstring in $error

Actual result:
--------------
Notice: Undefined variable:  error

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-08-18 08:51 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip

Works fine here.
 [2004-08-18 22:26 UTC] et@php.net
Has been fixed in the meanwhile.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jun 28 09:01:32 2025 UTC