php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3348 require broken
Submitted: 2000-01-29 11:10 UTC Modified: 2000-01-29 12:30 UTC
From: danny dot heijl at cevi dot be Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Latest CVS (29/01/2000) OS: Linux Red Hat 6.0
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: danny dot heijl at cevi dot be
New email:
PHP Version: OS:

 

 [2000-01-29 11:10 UTC] danny dot heijl at cevi dot be
Defining functions and classes inside required files no longer works.

Following script should echo "foobar" but does not :

require.php :
<?php
echo "foo";
require("./inc.php"); //defines foo()
foo();
?>

inc.php :
<?php
function foo() {
  echo "bar\n";
}
?>

./php require.php
X-Powered-By: PHP/4.0b4-dev
Content-Type: text/html

foo

Also, scripts die silently if you define classes inside required files.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-01-29 12:30 UTC] zeev at cvs dot php dot net
Fixed - thanks for the report
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 17:01:34 2025 UTC