php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #69573 Classes and Objects > Properties
Submitted: 2015-05-05 12:26 UTC Modified: 2015-05-05 14:01 UTC
From: ramoaidas at gmail dot com Assigned: cmb (profile)
Status: Not a bug Package: Documentation problem
PHP Version: 5.5.24 OS: Windows 8/ Ubuntu
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 !
Your email address:
MUST BE VALID
Solve the problem:
43 + 2 = ?
Subscribe to this entry?

 
 [2015-05-05 12:26 UTC] ramoaidas at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/language.oop5.properties
---

Dont work properties with operators . and +

Test script:
---------------
 public $var1 = 'hello ' . 'world';
 public $var3 = 1+2;


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-05-05 14:01 UTC] cmb@php.net
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2015-05-05 14:01 UTC] cmb@php.net
The documentation already states:

| This declaration may include an initialization, but this
| initialization must be a constant value [...]

So it appears this is not a bug.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 03 13:01:32 2024 UTC