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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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

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 23:01:28 2024 UTC