- Output for 7.0.0 - 7.0.31, 7.1.0 - 7.1.21, 7.2.0 - 7.2.9
- Fatal error: Cannot use temporary expression in write context in /in/ho7MF on line 3
Process exited with code 255.
<?php
$objA = (new \stdClass())->A = 1;
$objB = (new \stdClass())->B = 2;
$objC = (new \stdClass())->C = 3;
$objD = (new \stdClass())->D = 4;
$arr1 = [
$objA, $objC
];
$arr2 = [
$objB, $objD
];
var_dump(in_array($arr1, $objA));
var_dump(array_diff($arr1, $arr2));