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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: chris at claimlynx dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Thu Dec 26 13:01:30 2024 UTC