« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 1 of about 1 for firstfile (0.000 sec.)
Phar::offsetExists — ファイルが phar 内に存在するかどうかを調べる | PHP 8.3 9414
Phar::offsetExists (PHP 5 >= 5.3.0, PHP 7, PHP 8, PECL phar >= 1.0.0) Phar::offsetExists — ファイルが phar 内に存在するかどうかを調べる 説明 public function Phar::offsetExists ( string $localName ): bool これは ArrayAccess インターフェイスを ... 返します。 例 例1 Phar::offsetExists() の例 <?php $p = new Phar ( dirname ( __FILE__ ) . '/my.phar' , 0 , 'my.phar' ); $p [ 'firstfile.txt' ] = 'first file' ; $p [ 'secondfile.txt' ] = 'second file' ; // 以下の行では、offsetExists() が間接的にコールされます ... var_dump (isset( $p [ 'firstfile.txt' ])); var_dump (isset( $p [ 'nothere.txt' ])); ?> 上の例の出力は以下となります。 bool(true) bool(false) 参考 Phar::off ...
https://man.mtool.work/php/8.3/phar.offsetexists.html
PREV 1 NEXT