|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-08-30 08:49 UTC] dbeu@php.net
[2001-10-02 19:19 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 06 17:00:01 2025 UTC |
I have had problems instanciating classes that have empty constructors defined. (PHP 4.05, win2000) if a class has a constructor defined it seems that a (any) variable of that class must be set inside the constructor ot the class does not become properly instanciated. If there is no Constructor then this problem does not exist. eg1, this works: class Foo { var $a; function Foo() { $a = 1; } } eg2, this does not work class Foo { var $a; function Foo() { //empty constructor } } eg3, this works class Foo { var $a; //no constructor defined }