ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
**一.Assert改进** #php.ini默认开启 #assert(true === false); 1.低版本下失败的assert断言会引发警告,但不会引发异常.(PHP5) ``` assert.exception=On ``` &emsp; 2.php8开始失败的assert断言会直接引发异常.(PHP7,PHP8) ``` assert.exception=On ``` &emsp; **二.Assert回调** 1.display_errors = Off &emsp; 2.assert.callback = assert_fail &emsp; 3.回调实验 ``` assert(5<10); function assert_fail($file,$line,$assertion,$description){ echo $file; echo '<br>'; echo $line; echo '<br>'; echo $description; } ```