Doc #76122 [NEW]: some example code is wrong of "String" in Chinese Doc

From: Date: Wed, 21 Mar 2018 00:08:01 +0000
Subject: Doc #76122 [NEW]: some example code is wrong of "String" in Chinese Doc
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-15549@lists.php.net to get a copy of this message
From: hongstarw at 126 dot com Operating system: PHP version: 7.2.4RC1 Package: Documentation problem Bug Type: Documentation Problem Bug description:some example code is wrong of "String" in Chinese Doc Description: ------------ some example code is wrong of "String" in Chinese Doc link: http://php.net/manual/zh/language.types.string.php 也可以在字符串中用此语法通过变量来调用类的属性。 <?php class foo { var $bar = 'I am bar.'; } $foo = new foo(); $bar = 'bar'; $baz = array('foo', 'bar', 'baz', 'quux'); echo "{$foo->$bar}\n"; echo "{$foo->$baz[1]}\n"; ?> 以上例程会输出: I am bar. I am bar. The line before "?>" should be "echo "{$foo->{$baz[1]}}\n";" {} is missing in Chinese document.There will be an error. Please check it. Expected result: ---------------- "echo "{$foo->$baz[1]}\n" " should be "echo "{$foo->{$baz[1]}}\n";" -- Edit bug report at https://bugs.php.net/bug.php?id=76122&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76122&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76122&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76122&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=76122&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=76122&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=76122&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=76122&r=needscript Try newer version: https://bugs.php.net/fix.php?id=76122&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=76122&r=support Expected behavior: https://bugs.php.net/fix.php?id=76122&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=76122&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=76122&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=76122&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76122&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=76122&r=dst IIS Stability: https://bugs.php.net/fix.php?id=76122&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=76122&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=76122&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=76122&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=76122&r=mysqlcfg

« previous php.doc.bugs (#15549) next »