php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3623 PHP fails to interpret included or required array declaration and init.
Submitted: 2000-02-25 13:03 UTC Modified: 2000-08-17 15:36 UTC
From: chris at claimlynx dot com Assigned:
Status: Closed Package: Parser error
PHP Version: 3.0.12 OS: FreeBSD3.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
48 - 37 = ?
Subscribe to this entry?

 
 [2000-02-25 13:03 UTC] chris at claimlynx dot com
Using Apache 1.3.9 module version of PHP.

In an HTML web page, the following simply displays the actual text of the PHP code instead of it being interpreted.  If included/required code is added inline in same file, it works fine.

In test.php3:
<?php
include "$DOCUMENT_ROOT/arrayinit.inc";
// -OR-
require "$DOCUMENT_ROOT/arrayinit.inc";
?>

In arrayinit.inc:
// init my array
$myarray = (
   "a" => "apple",
   "b" => "banana",
   "c" => "cherry"
);

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-17 15:36 UTC] hholzgra@php.net
the code in an included file
has to be embeded in <?....?>
for itself
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 01 16:01:31 2024 UTC