php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58994 Constant function parameters fail
Submitted: 2009-12-16 13:07 UTC Modified: 2009-12-16 14:04 UTC
From: contact at NOSPAM dot swiftlytilting dot com Assigned:
Status: Closed Package: bcompiler (PECL)
PHP Version: 5_3.1RC2 OS: Windows
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:
MUST BE VALID
Solve the problem:
50 - 2 = ?
Subscribe to this entry?

 
 [2009-12-16 13:07 UTC] contact at NOSPAM dot swiftlytilting dot com
Description:
------------
Using constants as default parameter values in function definitions causes bcompiler to crash using  bcompiler_write_file.

I'm using php 5.3.1, bcompiler 0.91

This does not occur in 0.6, not sure about 0.7 or 0.8 though

Reproduce code:
---------------
<?php
define("SOME_CONST",1);
function foo($var = SOME_CONST)
{ return;
}

foo();

?>

Expected result:
----------------
expect code to run normally

Actual result:
--------------
causes abnormal program termination (crash)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-12-16 14:04 UTC] val@php.net
This bug has been fixed in SVN.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 13:01:30 2024 UTC