php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #50113 No way to break long strings when declaring class constant
Submitted: 2009-11-07 17:12 UTC Modified: 2010-12-28 21:35 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: samuel dot hapak at gmail dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.2.11 OS: Debian
Private report: No CVE-ID: None
 [2009-11-07 17:12 UTC] samuel dot hapak at gmail dot com
Description:
------------
Consider following example:

class Example
{
    const LONG_SENTENCE = "This sentence is really very very very very very very very very very very very very very very very very very very very very very very very very long";

};

It is not possible to breakup the assigned string using dot operator, and php also doesn't support neither c-like constant string concatenation ("really " "very" -> "really very") or c-like line continuation (end the line with backslash). 

This is really annoying, cause I end with the code containing extra long lines and I can't split them, making code unreadable without scrolling. 


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-28 21:35 UTC] jani@php.net
-Status: Open +Status: Bogus -Package: Feature/Change Request +Package: *General Issues
 [2010-12-28 21:35 UTC] jani@php.net
Same as bug #30177
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 10:01:33 2025 UTC