From: kulakov74 at yandex dot ru Operating system: - PHP version: 7.4.5 Package: Website problem Bug Type: Feature/Change Request Bug description:Replace nbsp; with plain spaces
Description: ------------ Hi. I'm studying PHP with your online manual https://www.php.net/manual/en/language.generators.syntax.php#control-structures.yield and it has an example "Example #1 A simple example of yielding values"; when I copied and pasted it in my test php script I got a lot of parse errors; I found out later that they were caused by the nbsp; character used in the example code instead of plain spaces. I recommend you not to use the nbsp character and use plain space instead, in order to ease with trying the examples in the manual. nbsp is not required for proper formatting, plain space is enough, provided that a monospace font is used. Test script: --------------- function gen_one_to_three() { Expected result: ---------------- 1 2 3 Actual result: -------------- Parse error: syntax error, unexpected 'for' (T_FOR) -- Edit bug report at https://bugs.php.net/bug.php?id=79490&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=79490&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=79490&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=79490&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=79490&r=needscript Try newer version: https://bugs.php.net/fix.php?id=79490&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=79490&r=support Expected behavior: https://bugs.php.net/fix.php?id=79490&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=79490&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=79490&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=79490&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=79490&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=79490&r=dst IIS Stability: https://bugs.php.net/fix.php?id=79490&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=79490&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=79490&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=79490&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=79490&r=mysqlcfg -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
