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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Wed May 29 09:01:33 2024 UTC