stream_get_filters()函數是PHP中的內置函數,用於獲取已注冊流過濾器的列表。
用法:
array stream_get_filters( void )
參數:該函數不接受任何參數。
返回值:該函數返回一個包含所有可用流過濾器名稱的數組。
以下示例程序旨在說明PHP中的stream_get_filters()函數:
示例1:
<?php
// PHP program to illustrate
// stream_get_filter function
$streamlist = stream_get_filters();
print_r($streamlist);
?>
輸出:
Array ( [0] => zlib.* [1] => string.rot13 [2] => string.toupper [3] => string.tolower [4] => string.strip_tags [5] => convert.* [6] => consumed [7] => dechunk [8] => convert.iconv.* )
示例2:程序打印按函數返回的過濾器數量。
<?php
// PHP program to illustrate
// stream_get_filter function
$res = stream_get_filters();
$count = sizeof($res);
// Print result
echo "Total Available Filters = " . $count;
?>
輸出:
Total Available Filters = 9
參考: http://php.net/manual/en/function.stream-get-filters.php
相關用法
- p5.js day()用法及代碼示例
- PHP dir()用法及代碼示例
- PHP each()用法及代碼示例
- PHP each()用法及代碼示例
- p5.js second()用法及代碼示例
- p5.js int()用法及代碼示例
- d3.js d3.max()用法及代碼示例
- PHP Ds\Map put()用法及代碼示例
- p5.js str()用法及代碼示例
- p5.js arc()用法及代碼示例
- d3.js d3.hcl()用法及代碼示例
- d3.js d3.lab()用法及代碼示例
注:本文由純淨天空篩選整理自R_Raj大神的英文原創作品 PHP | stream_get_filters() Function。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。