在PHP日志中,常见的错误类型包括:
// Fatal error: Call to undefined function test_function() in /path/to/file.php on line 10
// Parse error: syntax error, unexpected '=' in /tmp/php/index.php on line 20
z=1;
// Warning: include(a.php): failed to open stream: No such file or directory in /tmp/php/index.php on line 7
include("a.php");
// Notice: Undefined variable: b in /tmp/php/index.php on line 9
$a = $b;
// Deprecated: curl_s
// Parse error: syntax error, unexpected '=' in /tmp/php/index.php on line 20
z=1;
// Strict Standards: Only variables should be passed by reference in /tmp/php/index.php on line 17
function change(&$var){$var +=10;}
$var =1;
change(++$var);
// Catchable fatal error: Argument 1 passed to testCall() must be an instance of A, instance of B given, called in /tmp/php/index.php on line 37 and defined in /tmp/php/index.php on line 33
classA{}
classB{}
function testCall(A $a){}$b =newB();
testCall($b);
以上就是PHP日志中常见的错误类型,了解这些错误类型有助于开发者在开发和维护过程中快速定位和解决问题。
辰迅云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读: centos删除路由的方法是什么