note 87755 added to language.constants.predefined

From: Date: Fri, 19 Dec 2008 17:05:03 +0000
Subject: note 87755 added to language.constants.predefined
Groups: php.notes 
Request: Send a blank email to php-notes+get-148351@lists.php.net to get a copy of this message
jamessocol, if you're running PHP 5.3 you can do this: <?php class Model { static function find() { echo get_called_class(); } } class Product extends Model {} class User extends Model {} Product::find(); // "Product" User::find(); // "User" ?> ---- Server IP: 87.124.35.190 Probable Submitter: 82.153.169.132 ---- Manual Page -- http://www.php.net/manual/en/language.constants.predefined.php Edit -- https://master.php.net/note/edit/87755 Del: integrated -- https://master.php.net/note/delete/87755/integrated Del: useless -- https://master.php.net/note/delete/87755/useless Del: bad code -- https://master.php.net/note/delete/87755/bad+code Del: spam -- https://master.php.net/note/delete/87755/spam Del: non-english -- https://master.php.net/note/delete/87755/non-english Del: in docs -- https://master.php.net/note/delete/87755/in+docs Del: other reasons-- https://master.php.net/note/delete/87755 Reject -- https://master.php.net/note/reject/87755 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#148351) next »