Re: Recursive Static Method
| From: | Yeti | Date: | Thu, 13 Nov 2008 07:52:11 +0000 |
| Subject: | Re: Recursive Static Method | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-283237@lists.php.net to get a copy of this message | ||
Some code would be quite helpful here. But your scenario should not
make any problem.
EXAMPLE:
<?
class foo {
static function test() {
static $count;
$count++;
echo "Call {$count}<br />";
include_once('test.php');
}
}
foo::test();
?>
EXAMPLE (@file: test.php):
<?php
if (class_exists('foo')) {
foo::test();
}
exit();
?>
OUTPUT:
Call 1<br />Call 2<br />
//A yeti