3v4l.org

run code in 300+ PHP versions simultaneously
<?php header('Content-Type: text/plain'); function errorHandler($errno, $errstr, $errfile, $errline) { if ($errno === E_RECOVERABLE_ERROR) { $foo = []; asort($foo); echo $errstr . PHP_EOL; return true; } return false; } set_error_handler('errorHandler'); $key = [ (int) 0 => 'foo' ]; $select = [ 'id' => new stdClass(), 'foo' => 'foo', 'bar' => 'bar' ]; $missingFields = array_diff($key, $select) !== []; var_dump($missingFields);

preferences:
25.26 ms | 408 KiB | 5 Q