Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

短縮形のechoタグ<?=の説明の誤訳訂正 #6

Merged
merged 1 commit into from May 8, 2021

Conversation

takaram
Copy link
Contributor

@takaram takaram commented May 7, 2021

This syntax is available even with the short_open_tag configuration setting disabled.

原文の"even"の意味が抜け落ちて反対の意味の訳になっていました。
実際には、short_open_tagの設定に関わらず<?=の開始タグは有効です。

$ php -v
PHP 8.0.5 (cli) (built: May  3 2021 11:30:38) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.5, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.5, Copyright (c), by Zend Technologies
$ echo '<? echo "foo"; ?><?= "bar\n" ?>' | php -d short_open_tag=On
foobar
$ echo '<? echo "foo"; ?><?= "bar\n" ?>' | php -d short_open_tag=Off
<? echo "foo"; ?>bar

Copy link
Member

@mumumu mumumu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

完全に誤訳ですね。指摘ありがとうございます 🙏

@mumumu mumumu merged commit 8babd51 into php:master May 8, 2021
mumumu added a commit that referenced this pull request May 8, 2021
…ref. #6)

とても紛らわしい。以下の echo のマニュアルには、「開始タグの直後に等号を付ける短縮構文」と明示的に文脈が説明されているので、良しとする。

https://www.php.net/manual/ja/function.echo.php
@takaram takaram deleted the patch-1 branch July 6, 2021 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants