久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      PHP8.1新特性大講解之a(chǎn)rray_is_list功能

      本文系翻譯,原文地址:https://stitcher.io/blog/new-in-php-81#new-array_is_list-function-rfc

      PHP8.1新特性大講解之a(chǎn)rray_is_list功能

      新array_is_list功能

      您可能偶爾不得不處理這個(gè)問(wèn)題:確定數(shù)組的鍵是否按數(shù)字順序排列,從索引 0 開(kāi)始。就像json_encode決定數(shù)組應(yīng)該被編碼為數(shù)組還是對(duì)象一樣。

      PHP 8.1 添加了一個(gè)內(nèi)置函數(shù)來(lái)確定數(shù)組是否是具有這些語(yǔ)義的列表:

      $list = ["a", "b", "c"]; array_is_list($list); // true $notAList = [1 => "a", 2 => "b", 3 => "c"]; array_is_list($notAList); // false $alsoNotAList = ["a" => "a", "b" => "b", "c" => "c"]; array_is_list($alsoNotAList); // false

      詳情查看RFC:https://wiki.php.net/rfc/is_list

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)