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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: brad at brocku dot ca
New email:
PHP Version: OS:

 

 [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 00:01:41 2024 UTC