タグ

マニュアルとphpに関するiwwのブックマーク (64)

  • PHP: hypot - 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

    iww
    iww 2023/08/31
    直角三角形の斜辺の長さを求める関数。 なぜこんなピンポイントな関数が存在するのか
  • PHP: goto - 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: マジック定数 - 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

    iww
    iww 2023/02/14
    __DIR__ 『ルートディレクトリである場合を除き、ディレクトリ名の末尾にスラッシュはつきません。』
  • PHP: str_contains - 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

    iww
    iww 2022/09/26
    空文字列は必ずヒットする
  • @var — phpDocumentor

  • PHP: array_splice - 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

  • 2018年のPHPDoc事情とPSR-5 - Qiita

    PHPDocとは、クラスや関数などのブロックに記述できるDocComment内に記述する書式の通称です。この書式の情報源として時折PSR-5が参照されることがあるので簡単に状況をまとめます。 TL;DR PSR-5の標準化ステータスは昨年10月にABANDONED (放棄・議論停滞)になりました 2018年9月26日にPSR-5とPSR-19が分割され、ともにDRAFT状態に入りました PHPDocを型注釈として利用する各処理系の実装にはばらつきがあり、PSR-5とは相違点があります PhpStormは現在のところ(2018.1 EAP)PSR-5と互換性がありません 特にチーム開発では、対応する型記述の書式について注意が必要です PhpStormに配慮して書く場合、phpDocumentorの仕様を参照する方が安全です PHPDoc リファレンス — phpDocumentor この記事

    2018年のPHPDoc事情とPSR-5 - Qiita
    iww
    iww 2020/04/08
    『PhpStormは現在のところ(2018.1 EAP)PSR-5と互換性がありません』 『PhpStormに配慮して書く場合、phpDocumentorの仕様を参照する方が安全です』
  • PHP: syslog - 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

  • @param — phpDocumentor

  • [PHP]readfileは巨大ファイルを扱える | なうびるどいんぐ

    「例えば、PHPを避ける」、もちろん間違った考え方なんだけど、この記事を書いた人がそう言いたくなるのも少し理解出来る PHP、いい加減でもいい加減に動いてくれて、非プログラマでもとりあえずそれっぽい感じに動く。 お陰様でネット上には間違った情報だらけ、今回はちょっと目に付いた「readfile()」と言う関数の間違いを書いてみる。 悲劇のreadfile 「PHP readfile」でググると結構良いランクの所に「メモリに溜め込んで使えない」だの書かれてあって可哀想に思う、readfileの事が。 それとは別に「echo file_get_contents("hoge");」をサンプルとして載せているサイトも少なくないと思う(調べてはいないが タイトルにもある通りだが、readfileは巨大なファイルを扱える、もちろんメモリに溜め込んだりはしない。(この事はきちんと公式マニュアルに書かれて

    [PHP]readfileは巨大ファイルを扱える | なうびるどいんぐ
    iww
    iww 2019/06/05
    『ここから導き出される結論は1つなんですよ、公式のマニュアル読んで下さい。』
  • PHP: mcrypt_encrypt - Manual

    パラメータ cipher MCRYPT_暗号名 定数のいずれか、 あるいはアルゴリズム名をあらわす文字列。 key データを暗号化する際のキー。 指定した暗号化方式に対応していないサイズのキーを渡された場合は、 警告を発して false を返します。 data 指定した cipher および mode で暗号化するデータ。 データの大きさが n * blocksize でない場合、データは、 '\0'で埋められます。 返される暗号化されたテキストは、data で指定したデータの大きさよりも大きくなる可能性があります。 mode 定数 MCRYPT_MODE_モード名、あるいは文字列 "ecb", "cbc", "cfb", "ofb", "nofb" ,"stream" のいずれか。 iv CBC, CFB, OFB モードおよび STREAM モードのいくつかのアルゴリズムの初期化の際に

    iww
    iww 2019/02/06
    『この関数は PHP 7.1.0 で 非推奨になります。この関数に頼らないことを強く推奨します。』 まだ大丈夫、もう少し頑張ってもらおう
  • PHP: Grapheme 関数 - Manual

    Grapheme 関数 目次grapheme_extract — デフォルトの書記素クラスタシーケンスをテキストバッファから取り出す関数。 テキストは UTF-8 でエンコードされている必要がありますgrapheme_stripos — 大文字小文字を区別せず、文字列内で最初にあらわれる場所の (書記素単位の) 位置を見つけるgrapheme_stristr — 大文字小文字を区別せず、haystack 文字列の中で needle が最初に登場した場所以降の部分文字列を返すgrapheme_strlen — 書記素単位で文字列の長さを取得するgrapheme_strpos — 文字列内で最初にあらわれる場所の (書記素単位の) 位置を見つけるgrapheme_strripos — 大文字小文字を区別せず、文字列内で最後にあらわれる場所の (書記素単位の) 位置を見つけるgrapheme_s

  • PHP: array_fill - 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

    iww
    iww 2018/08/02
  • PHPをコマンドラインから使用する

    第 23章PHPをコマンドラインから使用する 4.3以降でPHPは Command Line Interfaceを意味する CLIという名前の新しいSAPI型 (Server Application Programming Interface)をサポートします。 名前から分かるように、このSAPI型は、 PHPによるシェル(またはデスクトップ)アプリケーショ ンの開発を主な対象としています。 CLI SAPIと他のSAPIの間には、 いくつかの違いがあります。章では、これらについて詳細を説明します。 CLIとCGIはその振る舞いの多くが 共通であるにもかかわらず、違うSAPIであることに留意してください。 CLI SAPIは、当初PHP 4.2.0でリ リースされましたが、この時点では実験的なステータスにあったため、 ./configureを実行する際に、明示的に --enable-cl

  • 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

  • Definition of a ‘Type’ — phpDocumentor

    Definition of a ‘Type’¶ Many tags use a Type as part of their definition (such as the @return tag). These types differ from the official PHP definition to be able to represent all kinds of data. A complete definition will be given of these types and what they represent in the following sections. type-expression = 1*(array-of-type-expression|array-of-type|type ["|"]) array-of-type-expression = "("

    iww
    iww 2018/03/19
    PhpDocの型の書き方の解説
  • PHP: var_export - 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

    iww
    iww 2017/06/27
    『return パラメータを使う場合、この関数は内部的に出力バッファリングを使います。 そのため、ob_start() コールバック関数の中では使えません。』
  • PHP: readfile - 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: アジア - 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

    iww
    iww 2016/08/17
    この一覧に存在しない書き方だと、有効にならない
  • PHP: json_encode - 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

    iww
    iww 2016/06/08
    それなりにJsonになるしObjectに戻る