note 100372 deleted from language.references.whatdo by danbrown

From: Date: Tue, 12 Oct 2010 16:11:36 +0000
Subject: note 100372 deleted from language.references.whatdo by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-173167@lists.php.net to get a copy of this message
Note Submitter: vanevery at gmail dot com ---- @Amaroq Yes, you're right: the method gets called twice. Not because it is the first function, but because it is the constructor. Historically (and still) before magic methods, PHP supported constructors as functions that shared the same name as the class, e.g. "reftest". It's good practice to capitalize the names of your classes as this would have avoided the issue or made it more apparent.

« previous php.notes (#173167) next »