タグ

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

  • PHP: spl_autoload - 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: urlencode - 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

    oukastudio
    oukastudio 2013/09/16
    PHP では、 .ini ディレクティブの arg_separator により引数のセパレータを W3C が推奨するセミコロンに変更することが可能です。残念なことに、多くの ユーザーエージントはこのセミコロン区切り形式でデータを送信しません
  • PHP: file_get_contents - Manual

    file_get_contents( string $filename, bool $use_include_path = false, ?resource $context = null, int $offset = 0, ?int $length = null ): string|false この関数は file() と似ていますが、 offset で指定した場所から開始し length バイト分だけ ファイルの内容を文字列に読み込むという点が異なります。 失敗した場合、file_get_contents() は false を返します。 file_get_contents()はファイルの内容を文字列に読み込む 方法として好ましいものです。もしOSがサポートしていれば パフォーマンス向上のためにメモリマッピング技術が使用されます。 注意: 空白のような特殊な文字を有する URI をオー

    oukastudio
    oukastudio 2013/07/15
    file_get_contents()はファイルの内容を文字列に読み込む 方法として好ましいものです。もしOSがサポートしていれば パフォーマンス向上のためにメモリマッピング技術が使用されます。
  • PHP: mt_rand - Manual

    古い libc の多くの乱数発生器は、怪しげであるか特性が不明であったりし、 また低速でした。 mt_rand() 関数は、古い rand() の代替品となるものです。 この関数は、その特性が既知の乱数生成器 » メルセンヌ・ツイスター を使用し、 平均的な libc の rand()よりも 4 倍以上高速に乱数を生成します。 オプションの引数 min,max を付けずに コールした場合、mt_rand() は 0 から mt_getrandmax() の間の擬似乱数値を返します。 例えば、5 から 15 まで(端点を含む)の間の乱数値を得たい場合には mt_rand(5, 15) としてください。 警告 この関数が生成する値は、暗号学的にセキュアではありません。そのため、これを暗号や、戻り値を推測できないことが必須の値として使っては いけません。 暗号学的にセキュアな乱数が必要な場合は、

    oukastudio
    oukastudio 2013/06/06
    mt_rand:負の値に対応
  • PHP: property_exists - 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

    oukastudio
    oukastudio 2013/05/15
    property_exists() 関数は、マジックメソッド __get を使ってアクセスするプロパティを検出することはできません。
  • 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

    oukastudio
    oukastudio 2013/03/19
    シングルクォートあるいはダブルクォートで囲まれた PHP の 文字列 の中では、バックスラッシュは特別な意味を表します。 そのため、正規表現 \\ を使用して \ とマッチさせたい場合は PHP のコード内では "\\\\" あるいは '\\\
  • 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

    oukastudio
    oukastudio 2013/03/09
    ファイル終端における PHP ブロックの終了タグはオプション(任意)です。 include や require を利用する際には、 終了タグを省略する方が無難です。というのは、そうすることでファイルの最後に 予期せぬ空白文字があらわ
  • PHP: curl_setopt - 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

    oukastudio
    oukastudio 2013/02/18
    CURLOPT_POSTFIELDS HTTP "POST" で送信するすべてのデータ。 ファイルを送信するには、ファイル名の先頭に @ をつけてフルパスを指定します。ファイルタイプを明示的に指定するには、ファイル名の後に ';type=mimetype' 形式で続けま
  • 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

    oukastudio
    oukastudio 2013/01/07
    PHP 5.1.0 以降では、--with-readline オプションつきで PHP をコンパイルした場合に CLI SAPI で対話シェルが使えるようになりました。 対話シェルは、-a オプションで使うことができます。 対話シェルを使うと、PHP のコードを打ち
  • PHP: PDOStatement::rowCount - 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

  • 1