« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 11 for cdef (0.002 sec.)
FFI::cdef — 新しい FFI オブジェクトを作成する | PHP 8.3 11967
FFI::cdef (PHP 7 >= 7.4.0, PHP 8) FFI::cdef — 新しい FFI オブジェクトを作成する 説明 public static function FFI::cdef ( string $code = "" , ? string $lib = null ): FFI 新しい FFI オブジェクトを作成します。 パラメータ code 通常の C 言語の宣言 ...
https://man.mtool.work/php/8.3/ffi.cdef.html
FFI の基本的な使い方 | PHP 8.3 11398
FFI の基本的な使い方 FFI API の詳細に深く立ち入る前に、よくあるタスクに対する FFI API の使い方が どれほど簡単かを示す例をいくつか見てみましょう。 注意 : これらの例の中には、 libc.so.6 を必要とするものがあります。 それらは、このライブラリが利 ... 有ライブラリの関数を呼ぶ <?php // FFI オブジェクトを作成し、libc を読み込んで printf() 関数をエクスポートする $ffi = FFI :: cdef ( "int printf(const char *format, ...);" , // ここは通常の C の宣言 "libc.so.6" ); // C の printf() を呼ぶ $ffi -> printf ... 意してください。 例2 関数を呼び出し、構造体を引数経由で返す <?php // gettimeofday() のバインディングを作成する $ffi = FFI :: cdef ( " typedef unsigned int time_t; typedef unsigned int suseconds_t; struct timeval { time_t tv_sec; suseconds_t tv_usec; }; ... 存の C の変数にアクセスする <?php // FFI オブジェクトを作成し、libc を読み込んで errno 変数をエクスポートする $ffi = FFI :: cdef ( "int errno;" , // ここは通常の C の宣言 "libc.so.6" ); // C の errno を出力する var_dump ( $ffi -> errno ); ?> 上の例の出 ...
https://man.mtool.work/php/8.3/ffi.examples-basic.html
RRDGraph::setOptions — Sets the options for rrd graph export | PHP 8.3 10455
RRDGraph::setOptions (PECL rrd >= 0.9.0) RRDGraph::setOptions — Sets the options for rrd graph export 説明 public function RRDGraph::setOptions ( array $options ): void パラメータ options List of options for the image generation from the RR ... "--start" => "920804400" , "--end" => 920808000 , "--vertical-label" => "m/s" , "DEF:myspeed= $rrdFile :speed:AVERAGE" , "CDEF:realspeed=myspeed,1000,*" , "LINE2:realspeed#FF0000" )); ?> 例2 Set multiple color options <?php $graphObj -> setOptions ( ... , "--color=BACK#00000000" , "--color=GRID#00000000" , "--color=MGRID#00000000" , "DEF:myspeed= $rrdFile :speed:AVERAGE" , "CDEF:realspeed=myspeed,1000,*" , "LINE2:realspeed#FF0000" )); ?> Don't use key value syntax for same rrd option. It looks more ...
https://man.mtool.work/php/8.3/rrdgraph.setoptions.html
C のコードやデータへの主要インターフェース | PHP 8.3 10082
C のコードやデータへの主要インターフェース (PHP 7 >= 7.4.0, PHP 8) はじめに このクラスのオブジェクトは、ファクトリーメソッドである FFI::cdef() や FFI::load() 、 FFI::scope() によって作成されます。 定義された C の変数は FFI インスタンスのプロ ... nction cast ( FFI\CType | string $type , FFI\CData | int | float | bool | null &$ptr ): ? FFI\CData public static function cdef ( string $code = "" , ? string $lib = null ): FFI public static function free ( FFI\CData &$ptr ): void public static func ... of — アラインメントを取得する FFI::arrayType — 新しい C の配列型を動的に構築する FFI::cast — C の型キャストを実行する FFI::cdef — 新しい FFI オブジェクトを作成する FFI::free — アンマネージドなデータ構造を解放する FFI::isNull — FFI\CData が NULL ポイン ...
https://man.mtool.work/php/8.3/class.ffi.html
Procedural PECL/rrd example | PHP 8.3 8766
Procedural PECL/rrd example 例1 Procedural usage of rrd <?php $rrdFile = dirname ( __FILE__ ) . "/speed.rrd" ; //create rrd file rrd_create ( $rrdFile , array( "--start" , 920804400 , "DS:speed:COUNTER:600:U:U" , "RRA:AVERAGE:0.5:1:24" , "R ... ( "--start" , "920804400" , "--end" , "920808000" , "--vertical-label" , "m/s" , "DEF:myspeed= $rrdFile :speed:AVERAGE" , "CDEF:realspeed=myspeed,1000,*" , "LINE2:realspeed#FF0000" ) ); ?> 他のマニュアルの関連ページ Linux JM dirname(1) Linux JM dirna ...
https://man.mtool.work/php/8.3/rrd.examples-procedural.html
OOP PECL/rrd example | PHP 8.3 8570
OOP PECL/rrd example 例1 OO usage of rrd <?php $rrdFile = dirname ( __FILE__ ) . "/speed.rrd" ; $outputPngFile = dirname ( __FILE__ ) . "/speed.png" ; $creator = new RRDCreator ( $rrdFile , "now -10d" , 500 ); $creator -> addDataSource ( "s ... "--start" => "920804400" , "--end" => 920808000 , "--vertical-label" => "m/s" , "DEF:myspeed= $rrdFile :speed:AVERAGE" , "CDEF:realspeed=myspeed,1000,*" , "LINE2:realspeed#FF0000" ) ); $graphObj -> save (); ?> 他のマニュアルの関連ページ Linux JM dir ...
https://man.mtool.work/php/8.3/rrd.examples-oop.html
PHP のコールバック | PHP 8.3 8197
PHP のコールバック PHP のクロージャを、関数ポインタ型のネイティブ変数に代入したり、 関数の引数として渡したりできます。 例1 PHP の Closure を C の関数ポインタに代入する <?php $zend = FFI :: cdef ( " typedef int (*zend_write_func_t)(const cha ...
https://man.mtool.work/php/8.3/ffi.examples-callback.html
Windows のサポート | PHP 8.3 7823
Windows のサポート Core PHP_VERSION , PHP_MINOR_VERSION , PHP_RELEASE_VERSION の設定値は、常に数値になりました。 これより前のバージョンでは、buildconf を使ったビルドでは文字列でした。 phpize ビルドは、 ソースツリーを build dir 内に反映するよ ... ドされていましたが、 公式の Windows 用バイナリでは、この拡張モジュールが共有ライブラリとしてビルドされていました。 FFI FFI::cdef() と FFI::load() を使う際に、 ライブラリを指定する必要はなくなりました。 しかし実運用環境では、この便利機能を使うべきではあ ...
https://man.mtool.work/php/8.3/migration85.windows-support.html
外部関数インターフェース | PHP 8.3 7450
外部関数インターフェース はじめに この拡張は、Zend 拡張 API の深い知識が無くとも、あるいは第三の中間言語を学ぶことをせずとも、 純粋な PHP で共有ライブラリ ( .DLL または .so ) を読み込んだり、C の関数を呼び出したり、C のデータ構造にアクセスし ... of — アラインメントを取得する FFI::arrayType — 新しい C の配列型を動的に構築する FFI::cast — C の型キャストを実行する FFI::cdef — 新しい FFI オブジェクトを作成する FFI::free — アンマネージドなデータ構造を解放する FFI::isNull — FFI\CData が NULL ポイン ...
https://man.mtool.work/php/8.3/book.ffi.html
変更履歴 | PHP 8.3 6508
変更履歴 標準添付の拡張モジュールには次のような変更がありました。 Version Function Description 8.6.0 ini_get_all 各ディレクティブについて返される詳細情報の配列に、 builtin_default_value 要素が追加されました。 snmp3_get Net-SNMP ライブラリが ... 持つ DOMException がスローされていました。 FFI::cast FFI::cast を static メソッドとして呼び出すのは非推奨となりました。 FFI::cdef void を返す C の関数が、FFI\CType::TYPE_VOID ではなく PHP の null を返すようになりました。 FFI::load 現在のシステムユーザが ...
https://man.mtool.work/php/8.3/doc.changelog.html
PREV 1 2 NEXT