|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #79490 Replace nbsp; with plain spaces
Submitted: 2020-04-18 17:17 UTC Modified: 2021-07-06 16:25 UTC
From: kulakov74 at yandex dot ru Assigned:
Status: Open Package: Doc Build problem
PHP Version: 7.4.5 OS: -
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
17 - 10 = ?
Subscribe to this entry?

 [2020-04-18 17:17 UTC] kulakov74 at yandex dot ru
I'm studying PHP with your online manual
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)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-07-06 16:25 UTC]
-Package: Website problem +Package: Doc Build problem
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 12 22:01:29 2024 UTC