php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64615 Comment raises syntax error
Submitted: 2013-04-09 15:25 UTC Modified: 2013-04-09 18:20 UTC
From: messaged at messaged dot lv Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.3.23 OS: Ubuntu/MacOsX (x64)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: messaged at messaged dot lv
New email:
PHP Version: OS:

 

 [2013-04-09 15:25 UTC] messaged at messaged dot lv
Description:
------------
Tested following code on Ubuntu with php 5.3.22, 5.3.23 and Mac OS PHP 5.3.22. 
Same behaviour everywhere. 

MacOS php-config
https://gist.github.com/message/5346478

5.3.19 affected
http://codepad.viper-7.com/BJO4cL

5.4.9
http://codepad.viper-7.com/Hyju5z

P.S If you going to remove line between comments then everything will work fine.

Test script:
---------------
<?php

class Dummy
{

    protected $key = null;

    public function test()
    {
        $this->key = 'value';

        //Lose by exactly 1 - Half the stake is refunded.The other half is classed as a loser.
         
        //Lose by 2 or more - All bets are losers.
    }

}

Expected result:
----------------
Nothing should happen

Actual result:
--------------
Parse error: syntax error, unexpected '}' in 
/Users/message/Dropbox/Work/syntax_error.php on line 15


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-04-09 18:20 UTC] nikic@php.net
Your code contains a 0xc2a0 codeunit sequence which corresponds to a NO-BREAK SPACE (U+00A0) encoded in UTF-8. As such you do not see the character, but it is not considered a whitespace character by PHP, thus the error.
 [2013-04-09 18:20 UTC] nikic@php.net
-Status: Open +Status: Not a bug
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 14 05:01:34 2025 UTC