note 97164 added to function.get-class

From: Date: Tue, 06 Apr 2010 05:23:00 +0000
Subject: note 97164 added to function.get-class
Groups: php.notes 
Request: Send a blank email to php-notes+get-167719@lists.php.net to get a copy of this message
If you are using namespaces this function will return the name of the class including the namespace, so watch out if your code does any checks for this. Ex: namespace Shop; class Foo { public function __construct() { echo "Foo"; } } //Different file include('inc/Shop.class.php'); $test = new Shop\Foo(); echo get_class($test);//returns Shop\Foo ---- Server IP: 69.147.83.197 Probable Submitter: 188.26.135.232 ---- Manual Page -- http://www.php.net/manual/en/function.get-class.php Edit -- https://master.php.net/note/edit/97164 Del: integrated -- https://master.php.net/note/delete/97164/integrated Del: useless -- https://master.php.net/note/delete/97164/useless Del: bad code -- https://master.php.net/note/delete/97164/bad+code Del: spam -- https://master.php.net/note/delete/97164/spam Del: non-english -- https://master.php.net/note/delete/97164/non-english Del: in docs -- https://master.php.net/note/delete/97164/in+docs Del: other reasons-- https://master.php.net/note/delete/97164 Reject -- https://master.php.net/note/reject/97164 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#167719) next »