note 64113 added to function.get-parent-class

From: Date: Fri, 07 Apr 2006 18:28:53 +0000
Subject: note 64113 added to function.get-parent-class
Groups: php.notes 
Request: Send a blank email to php-notes+get-107533@lists.php.net to get a copy of this message
The "Zend PHP Certification Study Guide" has an BIG error regarding to this function which may mislead programmers while using it: in the page 212, Pratice Exam Questions: Question 10: What is the output of the following code snippet? <?php class Vehicle {} class Car extends Vehicle {} class Ferrari extends Car {} var_dump(get_parent_class("Ferrari")); ?> The answer in the book says it would be: string(7) "Vehicle" While it is, actually: string(3) "Car" Beware, there's no errata for this, it's a shame. ---- Server IP: 200.185.109.103 Probable Submitter: 200.207.4.56 (proxied: 200.207.4.56) ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.get-parent-class.php Edit -- http://master.php.net/note/edit/64113 Del: integrated -- http://master.php.net/note/delete/64113/integrated Del: useless -- http://master.php.net/note/delete/64113/useless Del: bad code -- http://master.php.net/note/delete/64113/bad+code Del: spam -- http://master.php.net/note/delete/64113/spam Del: non-english -- http://master.php.net/note/delete/64113/non-english Del: in docs -- http://master.php.net/note/delete/64113/in+docs Del: other reasons-- http://master.php.net/note/delete/64113 Reject -- http://master.php.net/note/reject/64113 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#107533) next »