php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #10910 var $foo = madness
Submitted: 2001-05-16 17:07 UTC Modified: 2001-05-16 17:27 UTC
From: jjones at net-conex dot com Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0 Latest CVS (2001-05-16) OS: Linux
Private report: No CVE-ID: None
 [2001-05-16 17:07 UTC] jjones at net-conex dot com
class foo {

  var $bar = "Some string";

  var $baz = new some_other_class_i_defined;

}



I would like for that to work, please.  ;)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-16 17:27 UTC] hholzgra@php.net
no way, initializer values have to be constants

use a constructor to initialize instead
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Jul 19 22:01:26 2019 UTC