3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $gidsProductIdDeleteArray = array_diff($gidsCompareArray, $ProductIdArray); $inserted = [1, 2, 4]; $db = [1, 2, 5]; $diff = array_diff($db, $inserted); var_dump($diff);
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.3.0alpha1
Notice: Undefined variable: gidsCompareArray in /in/BMTFv on line 3 Notice: Undefined variable: ProductIdArray in /in/BMTFv on line 3 Warning: array_diff(): Argument #1 is not an array in /in/BMTFv on line 3 array(1) { [2]=> int(5) }
Output for hhvm-3.12.14 - 3.17.3
Notice: Undefined variable: gidsCompareArray in /in/BMTFv on line 3 Notice: Undefined variable: ProductIdArray in /in/BMTFv on line 3 Warning: array_diff() expects parameter 1 to be an array or collection in /in/BMTFv on line 3 array(1) { [2]=> int(5) }