PHP語法大全

雙曲餘弦

« cos decbin » PHP Manual Math 函式 雙曲餘弦 cosh (PHP 4 >= 4.1.0, PHP 5, PHP 7, PHP 8)cosh — 雙曲餘弦 說明 cosh(float $arg): float 返回 arg 的雙曲餘弦值,定義為 (exp(arg) + exp(-arg))/2。 參數 arg 要處理的參數 返回值 arg 的雙曲餘弦值。 參見 cos() - 餘弦 acosh() - 反雙曲餘弦 sinh() - 雙曲正弦 cosh()
0 comments

拷貝檔案

« clearstatcache delete » PHP Manual 檔案系統函式 拷貝檔案 copy (PHP 4, PHP 5, PHP 7, PHP 8)copy — 拷貝檔案 說明 copy(string $source, string $dest, resource $context = ?): bool 將檔案從 source 拷貝到 dest。 如果要移動檔案的話,請使用 rename() 函式。 參數 source 原始檔路徑。 dest 目標路徑。如果 dest 是一個 URL,則如果封裝協議不支援覆蓋已有的檔案時拷貝操作會失敗。 警告 如果目標檔案已存在,將會被覆蓋。 context A valid context resource created with stream_context_create(). 返回值 [...]
0 comments

使用 uuencode 編碼一個字串

« convert_uudecode count_chars » PHP Manual 字串 函式 使用 uuencode 編碼一個字串 convert_uuencode (PHP 5, PHP 7, PHP 8)convert_uuencode — 使用 uuencode 編碼一個字串 說明 convert_uuencode(string $data): string convert_uuencode() 使用 uuencode 演算法對一個字串進行編碼。 uuencode 演算法會將所有(含二進制數據)字串轉化為可輸出的字元, 並且可以被安全的應用於網路傳輸。使用 uuencode 編碼后的數據 將會比源數據大35%左右 參數 data 需要被編碼的數據。 返回值 返回 uuencode 編碼后的數據 或者在失敗時返回 false。 範例 示例 #1 convert_uuencode() 例子 <?php$some_string = "test\ntext text\r\n";echo convert_uuencode($some_string);?> 參見 convert_uudecode() - 解碼一個 [...]
0 comments

解碼一個 uuencode 編碼的字串

« convert_cyr_string convert_uuencode » PHP Manual 字串 函式 解碼一個 uuencode 編碼的字串 convert_uudecode (PHP 5, PHP 7, PHP 8)convert_uudecode — 解碼一個 uuencode 編碼的字串 說明 convert_uudecode(string $data): string convert_uudecode() 解碼一個 uuencode 編碼的字串。 參數 data uuencode 編碼后的數據 返回值 返回解碼后的字串數據, 或者在失敗時返回 false.。 範例 示例 #1 convert_uudecode() 例子 <?php/* 你猜會輸出啥?:) */echo convert_uudecode("+22!L;W9E(%!(4\"$`\n`");?> 參見 convert_uuencode() - 使用 uuencode 編碼一個字串
0 comments

將字元由一種 Cyrillic 字元轉換成另一種

« chunk_split convert_uudecode » PHP Manual 字串 函式 將字元由一種 Cyrillic 字元轉換成另一種 convert_cyr_string (PHP 4, PHP 5, PHP 7)convert_cyr_string — 將字元由一種 Cyrillic 字元轉換成另一種 說明 convert_cyr_string(string $str, string $from, string $to): string 此函式將給定的字串從一種 Cyrillic 字元轉換成另一種,返回轉換之後的字串。 參數 str 要轉換的字元。 from 單個字元,代表源 Cyrillic 字符集。 to 單個字元,代表了目標 Cyrillic 字符集。 支援的型別有: k - koi8-r w - windows-1251 i - iso8859-5 a [...]
0 comments

返回一個常量的值

« connection_status define » PHP Manual 雜項 函式 返回一個常量的值 constant (PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8)constant — 返回一個常量的值 說明 constant(string $name): mixed 返回 name 對應的常量的值。 當你不知道常量名,卻需要獲取常量的值時,constant() 就很有用了。也就是說,常量名儲存在一個變數里,或者由函式返回時。 該函式也適用 類常量。 參數 name 常量名。 返回值 返回常量的值。 錯誤/異常 如果常量未定義,會拋出 Error 異常。 在 PHP 8.0.0 之前,會產生一個 E_WARNING 級別的錯誤。 更新日誌 版本 說明 8.0.0 如果常量未定義,constant() 現在會拋出 Error [...]
0 comments

返回連線的狀態位

« connection_aborted constant » PHP Manual 雜項 函式 返回連線的狀態位 connection_status (PHP 4, PHP 5, PHP 7, PHP 8)connection_status — 返回連線的狀態位 說明 connection_status(): int 獲得目前連線的狀態位。 返回值 獲得目前連線的狀態位, 可以用於與 CONNECTION_XXX 定義的常量來確定連線狀態。 參見 connection_aborted() - 檢查客戶端是否已經斷開 ignore_user_abort() - 設定客戶端斷開連線時是否中斷指令碼的執行 檢視連線處理 瞭解PHP處理連線的詳情。
0 comments

檢查客戶端是否已經斷開

« 雜項 函式 connection_status » PHP Manual 雜項 函式 檢查客戶端是否已經斷開 connection_aborted (PHP 4, PHP 5, PHP 7, PHP 8)connection_aborted — 檢查客戶端是否已經斷開 說明 connection_aborted(): int 檢查客戶端是否已經斷開。 返回值 如果客戶端已經斷開則返回1,否則返回0。 參見 connection_status() - 返回連線的狀態位 ignore_user_abort() - 設定客戶端斷開連線時是否中斷指令碼的執行 檢視連線處理 瞭解PHP處理連線的詳情。
0 comments

Print out a PHP class definition for a dispatchable interface

« com_message_pump variant_abs » PHP Manual COM 函式 Print out a PHP class definition for a dispatchable interface com_print_typeinfo (PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8)com_print_typeinfo — Print out a PHP class definition for a dispatchable interface 說明 com_print_typeinfo(variant|string $variant, ?string $dispatch_interface = null, bool $display_sink = false): bool The purpose of [...]
0 comments

建立一個陣列,包括變數名和它們的值

« asort count » PHP Manual 陣列 函式 建立一個陣列,包括變數名和它們的值 compact (PHP 4, PHP 5, PHP 7, PHP 8)compact — 建立一個陣列,包括變數名和它們的值 說明 compact(array|string $var_name, array|string ...$var_names): array 建立一個包含變數與其值的陣列。 對每個參數,compact() 在目前的符號表中查詢該變數名並將它新增到輸出的陣列中,變數名成為鍵名而變數的內容成為該鍵的值。簡單說,它做的事和 extract() 正好相反。返回將所有變數新增進去後的陣列。 注意: 在 PHP 7.3 之前版本,未設定的字串會被靜默忽略。 參數 var_name var_names compact() 接受可變的參數數目。每個參數可以是一個包括變數名的字串或者是一個包含變數名的陣列,該陣列中還可以包含其它單元內容為變數名的陣列, compact() 可以遞迴處理。 返回值 返回輸出的陣列,包含了新增的所有變數。 錯誤/異常 如果字串指向的變數未定義,compact() 會產生 E_NOTICE 級錯誤。 更新日誌 版本 說明 7.3.0 現在,如果字串指向的變數未定義,compact() [...]
0 comments

Rendering

« CommonMark\Render\Man Parle » PHP Manual CommonMark 函式 Rendering CommonMark\Render\XML (cmark >= 1.0.0)CommonMark\Render\XML — Rendering 說明 CommonMark\Render\XML(CommonMark\Node $node, int $options = ?): string 警告本函式還未編寫文件,僅有參數列表。 參數 node options A mask of: CommonMark\Render\Normal (int) CommonMark\Render\SourcePos (int) CommonMark\Render\HardBreaks (int) CommonMark\Render\Safe (int) CommonMark\Render\NoBreaks (int) 返回值
0 comments

Rendering

« CommonMark\Render\Latex CommonMark\Render\XML » PHP Manual CommonMark 函式 Rendering CommonMark\Render\Man (cmark >= 1.0.0)CommonMark\Render\Man — Rendering 說明 CommonMark\Render\Man(CommonMark\Node $node, int $options = ?, int $width = ?): string 警告本函式還未編寫文件,僅有參數列表。 參數 node options A mask of: CommonMark\Render\Normal (int) CommonMark\Render\SourcePos (int) CommonMark\Render\HardBreaks (int) CommonMark\Render\Safe (int) CommonMark\Render\NoBreaks (int) width 返回值
0 comments

Rendering

« CommonMark\Render\HTML CommonMark\Render\Man » PHP Manual CommonMark 函式 Rendering CommonMark\Render\Latex (cmark >= 1.0.0)CommonMark\Render\Latex — Rendering 說明 CommonMark\Render\Latex(CommonMark\Node $node, int $options = ?, int $width = ?): string 警告本函式還未編寫文件,僅有參數列表。 參數 node options A mask of: CommonMark\Render\Normal (int) CommonMark\Render\SourcePos (int) CommonMark\Render\HardBreaks (int) CommonMark\Render\Safe (int) CommonMark\Render\NoBreaks (int) width 返回值
0 comments

Rendering

« CommonMark\Render CommonMark\Render\Latex » PHP Manual CommonMark 函式 Rendering CommonMark\Render\HTML (cmark >= 1.0.0)CommonMark\Render\HTML — Rendering 說明 CommonMark\Render\HTML(CommonMark\Node $node, int $options = ?): string 警告本函式還未編寫文件,僅有參數列表。 參數 node options A mask of: CommonMark\Render\Normal (int) CommonMark\Render\SourcePos (int) CommonMark\Render\HardBreaks (int) CommonMark\Render\Safe (int) CommonMark\Render\NoBreaks (int) 返回值
0 comments

Rendering

« CommonMark\Parse CommonMark\Render\HTML » PHP Manual CommonMark 函式 Rendering CommonMark\Render (cmark >= 1.0.0)CommonMark\Render — Rendering 說明 CommonMark\Render(CommonMark\Node $node, int $options = ?, int $width = ?): string 警告本函式還未編寫文件,僅有參數列表。 參數 node options A mask of: CommonMark\Render\Normal (int) CommonMark\Render\SourcePos (int) CommonMark\Render\HardBreaks (int) CommonMark\Render\Safe (int) CommonMark\Render\NoBreaks (int) width 返回值
0 comments

Parsing

« CommonMark 函式 CommonMark\Render » PHP Manual CommonMark 函式 Parsing CommonMark\Parse (cmark >= 1.0.0)CommonMark\Parse — Parsing 說明 CommonMark\Parse(string $content, int $options = ?): CommonMark\Node Shall parse content 參數 content markdown string options A mask of: CommonMark\Parser\Normal (int) CommonMark\Parser\Normalize (int) CommonMark\Parser\ValidateUTF8 (int) CommonMark\Parser\Smart (int) 返回值 Shall return root CommonMark\Node
0 comments

Process COM messages, sleeping for up to timeoutms milliseconds

« com_load_typelib com_print_typeinfo » PHP Manual COM 函式 Process COM messages, sleeping for up to timeoutms milliseconds com_message_pump (PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8)com_message_pump — Process COM messages, sleeping for up to timeoutms milliseconds 說明 com_message_pump(int $timeout_milliseconds = 0): bool This function will sleep for up to timeout_milliseconds milliseconds, or until [...]
0 comments

裝載一個 Typelib

« com_get_active_object com_message_pump » PHP Manual COM 函式 裝載一個 Typelib com_load_typelib (PHP 4 >= 4.1.0, PHP 5, PHP 7, PHP 8)com_load_typelib — 裝載一個 Typelib 說明 com_load_typelib(string $typelib_name, bool $case_insensitive = true): bool Loads a type-library and registers its constants in the engine, as though they were defined using define(). Note that it is much more [...]
0 comments

Returns a handle to an already running instance of a COM object

« com_event_sink com_load_typelib » PHP Manual COM 函式 Returns a handle to an already running instance of a COM object com_get_active_object (PHP 5, PHP 7, PHP 8)com_get_active_object — Returns a handle to an already running instance of a COM object 說明 com_get_active_object(string $prog_id, ?int $codepage = null): variant com_get_active_object() is similar to creating a new [...]
0 comments

Connect events from a COM object to a PHP object

« com_create_guid com_get_active_object » PHP Manual COM 函式 Connect events from a COM object to a PHP object com_event_sink (PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8)com_event_sink — Connect events from a COM object to a PHP object 說明 com_event_sink(variant $variant, object $sink_object, array|string|null $sink_interface = null): bool Instructs COM to sink events [...]
0 comments