タグ

ブックマーク / www.php.net (217)

  • PHP: BC Math - Manual

    Useful function for bcround function getBcRound($number, $precision = 0) { $precision = ($precision < 0) ? 0 : (int) $precision; if (strcmp(bcadd($number, '0', $precision), bcadd($number, '0', $precision+1)) == 0) { return bcadd($number, '0', $precision); } if (getBcPresion($number) - $precision > 1) { $number = getBcRound($number, $precision + 1); } $t = '0.' . str_repeat('0', $precision) . '5';

  • PHP: array_reduce - Manual

    Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su

  • PHP: Locale::acceptFromHttp - Manual

    Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su

  • PHP: array_fill_keys - Manual

    Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su

  • PHP: Imagick::readImage - Manual

    Use this to convert all pages of a PDF to JPG: <?php $imagick = new Imagick(); $imagick->readImage('myfile.pdf'); $imagick->writeImages('converted.jpg', false); ?> If you need better quality, try adding $imagick->setResolution(150, 150); before reading the file! If you experience transparency problems when converting PDF to JPEG (black background), try flattening your file: <?php $imagick = new Im

  • PHP: Imagick::getImageBlob - Manual

  • PHP: Imagick::setImageFormat - Manual

    Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su

  • PHP: imagesx - Manual

    Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su

  • PHP: tmpfile - Manual

    Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su

  • PHP: gzencode - Manual

    Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su

  • PHP: rawurldecode - Manual

    Hi everybody =) My name is Javier and I'm from Argentina. I've had a little issue with latin characters like ñ","Ñ","á","é","í", etc. They are not decoded with rawurlencode(), so I've made this: <?php function urlRawDecode($raw_url_encoded) { # Hex conversion table $hex_table = array( 0 => 0x00, 1 => 0x01, 2 => 0x02, 3 => 0x03, 4 => 0x04, 5 => 0x05, 6 => 0x06, 7 => 0x07, 8 => 0x08, 9 => 0x09, "A"=

  • PHP: gzopen - Manual

    Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su

  • PHP: gzdecode - Manual

    To decode / uncompress the received HTTP POST data in PHP code, request data coming from Java / Android application via HTTP POST GZIP / DEFLATE compressed format 1) Data sent from Java Android app to PHP using DeflaterOutputStream java class and received in PHP as shown below echo gzinflate( substr($HTTP_RAW_POST_DATA,2,-4) ) . PHP_EOL . PHP_EOL; 2) Data sent from Java Android app to PHP using GZ

  • PHP: serialize - Manual

    パラメータ value シリアル化する値。 serialize() は、resource および一部の object 以外のすべての型を処理します。(下記の注を参照ください) 自分自身への参照を含む配列を serialize() することも可能です。 シリアル化した配列/オブジェクト内の 循環参照も保存されます。その他の参照は失われます。 PHP は、シリアル化の前にまずメンバ関数 __serialize() または __sleep() のコールを試みます。ここで、シリアル化の前のオブジェクトの後始末処理 などを行います。同様に、unserialize() で オブジェクトを復元した際にはメンバ関数 __unserialize() または __wakeup() がコールされます。 注意: オブジェクトの private メンバは、メンバ名の前にクラス名がつきます。 また protected

  • PHP: utf8_encode - Manual

    この関数は、文字列 string を ISO-8859-1 エンコードから UTF-8 へ変換します。 注意: この関数は、指定された文字列の現在の文字エンコーディングを推測しません。 代わりに、 ISO-8859-1 ("Latin 1" とも呼ばれています) としてエンコードされていると解釈し、UTF-8 に変換します。 全てのバイト列は有効な ISO-8859-1 の文字列であるため、 この関数は決してエラーになりません。 しかし、異なるエンコーディングを意図していた場合、 有用な結果にはならないでしょう。 ISO-8859-1 文字エンコーディングを使っているとマークされている 多くの Web ページが、実際にはそれと似た Windows-1252 を使っており、 Web ブラウザは ISO-8859-1 Web ページを Windows-1252 として解釈しています。Windo

  • PHP: サポートされる文字エンコーディング - Manual

    Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su

  • PHP: mb_strcut - Manual

    mb_strcut( string $string, int $start, ?int $length = null, ?string $encoding = null ): string mb_strcut() は、ある文字列からの部分文字列の抽出を mb_substr() と同じ方法で行います。ただし、 処理は文字単位ではなくバイト単位で行います。 切り出し位置がたまたまマルチバイト文字の 2 バイト目以降だった場合、 切り出しはその文字の最初のバイトから行われます。この挙動もまた substr() 関数と異なるところです。 substr() の場合は、 マルチバイト文字の 2 バイト目以降であってもその位置から切り出しを行い、 結果的に壊れたバイト列を返すことになります。 パラメータ string 取り出しの対象となる文字列。 start start が非負である場合に返される文字列

  • PHP: 実行時設定 - Manual

    PHP_INI_* モードの詳細および定義については どこで設定を行うのか を参照してください。 以下に設定ディレクティブに関する 簡単な説明を示します。 opcache.enable bool オペコード・キャッシュを有効にします。 無効にした場合、コードは最適化もキャッシュもされません。 opcache.enable の設定を、実行時に ini_set() で有効化することはできません。 実行時にできるのは、無効化だけです。スクリプト内で有効化しようとすると、警告が発生します。 opcache.enable_cli bool PHP の CLI 版に対してオペコード・キャッシュを有効にします。 opcache.memory_consumption int OPcache によって使用される共有メモリ・ストレージのサイズ。( MB 単位) 設定できる最小値は "8" です。これより小さい

  • PHP: compact - Manual

    Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su

    kathew
    kathew 2020/12/22
    PHP7.3より、未宣言の変数名はエラーを出力するとのこと。要注意
  • PHP: 関数の引数 - Manual : 可変長引数リスト

    Getting Started Introduction A simple tutorial Language Reference Basic syntax Types Variables Constants Expressions Operators Control Structures Functions Classes and Objects Namespaces Enumerations Errors Exceptions Fibers Generators Attributes References Explained Predefined Variables Predefined Exceptions Predefined Interfaces and Classes Predefined Attributes Context options and parameters Su