//自定义致命错误处理 function shutdownHandler() { if (is_null($e = error_get_last()) === false) { errorHandler($e['type'], $e['message'], $e['file'], $e['line']); } } //$a['bbb']; echo $a; echo 100 / 0; //$a + $b; class Sample { public function method() { //not static method } } Sample::method(); new Dummy(); throw new Exception('Uncaught Exception'); echo "Not Executed\n"; exit; $arr1 = [1, 2, 3]; $arr2 = [3, 4]; $diff = array_diff($arr2, $arr1); //if(empty(array_diff($arr2, $arr1))) { // echo '为空!'; //} else { // echo '不为空!'; //}