|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-12-21 10:55 UTC] et@php.net
[2020-02-07 06:12 UTC] phpdocbot@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 19 18:00:02 2025 UTC |
Description: ------------ In chapter 13 "Classes and objects" there is an example of non-valid and valid initializers: <?php /* None of these will work in PHP 4. */ class Cart { var $todays_date = date("Y-m-d"); var $name = $firstname; var $owner = 'Fred ' . 'Jones'; var $items = array("VCR", "TV"); } ... Actually, the initializer of $items varaible works at least in PHP 4.3.3. It may also work in previous versions as I haven't found any news in ChangeLog related to it.