php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2338 Redeclaration of functions not handled
Submitted: 1999-09-20 18:06 UTC Modified: 1999-09-27 11:27 UTC
From: brad at brocku dot ca Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Beta 2 OS: SGI IRIX 6.5.4
Private report: No CVE-ID: None
 [1999-09-20 18:06 UTC] brad at brocku dot ca
<?php

function one () {
}

print "Before\n";
function one () {
}

print "After\n";

?>

Using PHP4b2 running this script produces

Content-Type: text/html
--------------------------
Content-Type: text/html

Before
--------------------------
no errors or dump.

Running the same script with php 3.0.11 produces (as expected):
---------------------------
Content-type: text/html

Before
<br>
<b>Fatal error</b>:  Can't redeclare already declared function in <b>bug.php</b>
 on line <b>8</b><br>
-----------------------------

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-09-27 11:27 UTC] andrey at cvs dot php dot net
Somebody fixed this in the latest CVS.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 20:01:45 2024 UTC