|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-01-29 08:00 UTC] derick@php.net
[2003-01-30 08:45 UTC] hholzgra@php.net
[2012-06-20 19:14 UTC] nikic@php.net
[2012-06-20 19:14 UTC] nikic@php.net
-Status: Open
+Status: Closed
-Package: Feature/Change Request
+Package: *General Issues
-Assigned To:
+Assigned To: nikic
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 02 22:00:02 2025 UTC |
$array1 = array ("a" => "green", "red", "blue"); $array2 = array ("b" => "green", "yellow", "red"); if (false == empty(array_intersect ($array1, $array2))) { echo 1; } Log output: PHP Parse error: parse error, unexpected T_STRING, expecting T_VARIABLE or '$' in /var/www/test/arint.php on line 6 line 6 is the line with IF statement. However the following code works perfectly: $array1 = array ("a" => "green", "red", "blue"); $array2 = array ("b" => "green", "yellow", "red"); $result = array_intersect ($array1, $array2); if (false == empty($result)) { echo 1; }