[Fwd: Re: Recursive Static Method]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




--- Begin Message ---
Hi Guys,

I found the problem. I was using the error suppression operator on my include, and thus I could not see the syntatic error on the page.

Problem Solved,
- Craige

Yeti wrote:
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




--- End Message ---
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux