Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 119345 - PHP parser error
Summary: PHP parser error
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-17 15:45 UTC by James Pellow
Modified: 2006-01-17 16:09 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Pellow 2006-01-17 15:45:40 UTC
I have encountered what appears to be a bug in php.  Here are the details:

PHP 4.4.0-pl1-gentoo (cli) (built: Nov  6 2005 18:21:59)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
    with DBG v2.11.32, (C) 2000,2005, by Dmitri Dmitrienko

The following code does not parse:

$a = array();
$b = array();
$i = array_intersect($a, $b);
if (!empty($i)) echo 'Intersected';
if (!empty(array_intersect($a, $b)) echo 'Also intersected';

The following error is thrown on the second if statement:

Parse error: parse error, unexpected T_STRING, expecting T_VARIABLE or '$' in /home/pellja/test/test.php on line 5
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-01-17 16:09:48 UTC
Your syntax is invalid in both PHP4 and PHP5. Bugzilla is not a PHP programming forum.

http://ch2.php.net/empty