4.0b3 Class/Function question.
| From: | Stephen J. Taranto | Date: | Fri, 19 Nov 1999 20:30:23 +0000 |
| Subject: | 4.0b3 Class/Function question. | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-6523@lists.php.net to get a copy of this message | ||
Hi All -- I know this border's on a FAQ/RTFM, but I'll be damned if I
can find the answer. Is the following a bug or a dumb programmer?
/* Simplified psuedo code. */
<?php
class _Query {
function Query($q) {
echo "And the query is $q";
}
}
class Xyz extends _Query {
function Xyz ($val) {
echo "In Xyz($val) function...";
$this->Query("From Xyz()"); // Line 9 for in the msg below
}
}
$x = new Xyz("steve");
/* This will produce the error message Fatal error: Function call to a
non-function (query) in class_team.mfls on line 9. I haven't got it
quite nailed down but I' beginning to suspect that
calling a function in the parent class from the "contructor" function of
the child. Not
sure though. I don't hve access to all my source right now, but I'm
pretty sure I did this
using 4.0b2.
*/
?>
Any ideas? Thanks in advance,
-Steve.