note 76446 added to language.oop5.decon

From: Date: Mon, 16 Jul 2007 13:59:17 +0000
Subject: note 76446 added to language.oop5.decon
Groups: php.notes 
Request: Send a blank email to php-notes+get-128613@lists.php.net to get a copy of this message
The fact that class names are case-insensitive in PHP5 also applies to constructors. Make sure you don't have any functions named like the class *at all*. This has bitten me a few times. <?php class Example extends Base { function example() { echo "This gets called"; } } class Base { function __construct() { echo "Not this"; } } ?> ---- Server IP: 129.16.214.50 Probable Submitter: 212.247.90.194 ---- Manual Page -- http://www.php.net/manual/en/language.oop5.decon.php Edit -- https://master.php.net/note/edit/76446 Del: integrated -- https://master.php.net/note/delete/76446/integrated Del: useless -- https://master.php.net/note/delete/76446/useless Del: bad code -- https://master.php.net/note/delete/76446/bad+code Del: spam -- https://master.php.net/note/delete/76446/spam Del: non-english -- https://master.php.net/note/delete/76446/non-english Del: in docs -- https://master.php.net/note/delete/76446/in+docs Del: other reasons-- https://master.php.net/note/delete/76446 Reject -- https://master.php.net/note/reject/76446 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#128613) next »