Giter Site home page Giter Site logo

Comments (3)

mumumu avatar mumumu commented on May 28, 2024

何の処理も行われない b プレフィックス

PHP の language scanner は、b で始まるクォート文字列を string としてパースするように書かれているが、特別な処理は何も行われていない。PHP 8.1 現在、ユーザー視点からは何の意味もないコードである。

https://github.com/php/php-src/blob/php-8.1.0/Zend/zend_language_scanner.l#L2445-L2730

from doc-ja.

mumumu avatar mumumu commented on May 28, 2024

php/doc-en#1626 でこれらのサンプルを削除する PR を立ててみたところ、以下の指摘を貰った。

  • 確かに本件は contradictory で意味がないサンプルだが、歴史的な事情で存在している
  • 歴史的には、 PHP 6 でバイナリ文字列型 が提案されたために登場したサンプルである
    • ただ、これは日の目をみることはなかったし、これからもサポートされる可能性は低い
  • ちゃんとするなら、PHP internals でいったん確認を取ったほうが良い

from doc-ja.

mumumu avatar mumumu commented on May 28, 2024

確かに本件は contradictory で意味がないサンプルだが、歴史的な事情で存在している

よーく見ると、PHP マニュアル日本語版からは、上記の 歴史的な事情 という文脈が完全に抜け落ちていることがわかったため、84934fc で追加した。

こうすれば、本件は確かに現状は意味がないが、将来のために存在しているものだと明示することが出来る。

本件の削除は開発者コミュニティに話を通す必要があるのですぐには難しいが、いったんは上記のコミットで混乱は避けられるであろう。

from doc-ja.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.