簡體   English   中英

這個 php 語法有什么問題

[英]what could be wrong with this php syntax

這個 php 語法代碼有什么問題:

@trigger_error(sprintf("Using '%s' for the value of node '%s' of '%s' is deprecated since version 1.25 and will be removed in 2.0.", is_object($node) ? get_class($node) : null === $node "null": gettype($node), $name, get_class($this)), E_USER_DEPRECATED);

你錯過了“?” 自 PHP 7.4 起不推薦使用$node和嵌套三元表達式之后,所以用 "( ... )" 包裝它

這里完整的代碼:

@trigger_error(
    sprintf(
        "Using '%s' for the value of node '%s' of '%s' is deprecated since version 1.25 and will be removed in 2.0.",
        ((is_object($node) ? get_class($node) : null === $node) ? "null" : gettype($node)), $name, get_class($this)), 
    E_USER_DEPRECATED
);

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM