note 64113 deleted from function.get-parent-class by nlopess
| From: | nlopess@php.net | Date: | Fri, 07 Apr 2006 18:35:55 +0000 |
| Subject: | note 64113 deleted from function.get-parent-class by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-107534@lists.php.net to get a copy of this message | ||
Note Submitter: ahadez at gmail dot com
----
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.