Bug #80352 [NEW]: Behaviour of array_intersect and array_intersect_key changed
From: jelly dot legend at gmail dot com
Operating system:
PHP version: 8.0.0RC4
Package: Arrays related
Bug Type: Bug
Bug description:Behaviour of array_intersect and array_intersect_key changed
Description:
------------
PHP 8.0.0a promoted the warning if passing invalid number of arrays to
array_intersect(_key) was promoted to a fatal error. However, it seem
that something changed in the version 8.0.0b4 since no error is
produced.
https://3v4l.org/qkAt5
Test script:
---------------
<?php
$arrayArray = [
[1],[2]
];
array_intersect_key(...$arrayArray);// array_intersect
$arrayArray = [
[1]
];
array_intersect_key(...$arrayArray);// array_intersect
--
Edit bug report at https://bugs.php.net/bug.php?id=80352&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=80352&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=80352&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=80352&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=80352&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=80352&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=80352&r=support
Expected behavior: https://bugs.php.net/fix.php?id=80352&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=80352&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=80352&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=80352&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80352&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=80352&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=80352&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=80352&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=80352&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=80352&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=80352&r=mysqlcfg
Thread (2 messages)
- jelly dot legend at gmail dot com