From:             clynx at succont dot de
Operating system: FreeBSD 4.10/FreeBSD 5.4/WinXP
PHP version:      5CVS-2005-06-24 (dev)
PHP Bug Type:     Scripting Engine problem
Bug description:  Arrays are not handles as Variables

Description:
------------
When you try to use array_intersect in combination with a different
Function, it leads to a strange Error Message.

The Reproduce Code give the Error while the following does not:
<?php
$array1 = array('foo', 'bar', 'test');
$array2 = array('foo', 'me' );
$result = array_intersect( $array1, $array2 );
var_dump( array_shift( $result ) );
?>

And as far as array_intersect retuns an Array (a Variable ;o) this Error
is a little bit strange.

Reproduce code:
---------------
<?php
$array1 = array('foo', 'bar', 'test');
$array2 = array('foo', 'me' );
var_dump( array_shift( array_intersect( $array1, $array2 ) ) );
?>

Expected result:
----------------
webdev# php /htdocs/beta.webdev/succont.Unitized/test.php
string(3) "foo"

Actual result:
--------------
webdev# php /htdocs/beta.webdev/succont.Unitized/test.php
PHP Fatal error:  Only variables can be passed by reference in
/usr/local/htdocs/beta.webdev/succont.Unitized/test.php on line 4

-- 
Edit bug report at http://bugs.php.net/?id=33466&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=33466&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=33466&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=33466&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=33466&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=33466&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=33466&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=33466&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=33466&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=33466&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=33466&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=33466&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=33466&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=33466&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=33466&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=33466&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=33466&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=33466&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=33466&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=33466&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=33466&r=mysqlcfg

Reply via email to