note 88050 added to function.include-once

From: Date: Wed, 07 Jan 2009 21:42:36 +0000
Subject: note 88050 added to function.include-once
Groups: php.notes 
Request: Send a blank email to php-notes+get-148928@lists.php.net to get a copy of this message
Using include_once() in the __autoload() function is redundant. __autoload() is only called when php can't find your class definition. If your file containg your class was already included, the class defenition would already be loaded and __autoload() would not be called. So save a little overhead and only use include() within __autoload() Neil Holcomb ---- Server IP: 209.41.74.194 Probable Submitter: 69.106.153.176 ---- Manual Page -- http://www.php.net/manual/en/function.include-once.php Edit -- https://master.php.net/note/edit/88050 Del: integrated -- https://master.php.net/note/delete/88050/integrated Del: useless -- https://master.php.net/note/delete/88050/useless Del: bad code -- https://master.php.net/note/delete/88050/bad+code Del: spam -- https://master.php.net/note/delete/88050/spam Del: non-english -- https://master.php.net/note/delete/88050/non-english Del: in docs -- https://master.php.net/note/delete/88050/in+docs Del: other reasons-- https://master.php.net/note/delete/88050 Reject -- https://master.php.net/note/reject/88050 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#148928) next »