|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74898 1
Submitted: 2017-07-11 08:02 UTC Modified: 2017-07-11 08:09 UTC
From: tongsq77 at qq dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 7.0.21 OS: centos7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: tongsq77 at qq dot com
New email:
PHP Version: OS:


 [2017-07-11 08:02 UTC] tongsq77 at qq dot com
i use $str = 1.'abc'; and got Parse error

Test script:
var_dump(1 . '');//this is ok
var_dump(1.'');  //this cause Parse error

Expected result:
string(1) "1"
string(1) "1"

Actual result:
Parse error: syntax error, unexpected ''


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-07-11 08:09 UTC]
-Status: Open +Status: Not a bug
 [2017-07-11 08:09 UTC]
Because 1. is a number. If there's some bizarre reason making you concatenate 1 and '' then you have to have that space.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun Sep 25 17:05:53 2022 UTC