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
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: 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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 19:01:35 2025 UTC