php.net |  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
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: tongsq77 at qq dot com
New email:
PHP Version: OS:

 

 [2017-07-11 08:02 UTC] tongsq77 at qq dot com
Description:
------------
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 ''

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-07-11 08:09 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2017-07-11 08:09 UTC] requinix@php.net
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-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 11:01:30 2024 UTC