vr-shopxo-plugin/test_php81_warning.php

16 lines
419 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?php
/**
* 测试 PHP 8.1.4 是否会产生 exit(header(...)) 废弃警告
*/
echo "PHP Version: " . phpversion() . "\n";
echo "Error Reporting: " . error_reporting() . "\n";
echo str_repeat("-", 50) . "\n\n";
// 测试 1: exit(false) - 应该产生警告
echo "Test 1: exit(false)\n";
@exit(false);
// 注意exit() 会终止脚本,所以下面的代码不会执行
echo "This line should not be printed\n";