Re: AW: [PEAR-DEV] Validate_DE
| From: | Pierre-Alain Joye | Date: | Tue, 21 Oct 2003 09:21:51 +0000 |
| Subject: | Re: AW: [PEAR-DEV] Validate_DE | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-22866@lists.php.net to get a copy of this message | ||
On Tue, 21 Oct 2003 10:58:23 +0200
"Stephan Schmidt" <s.schmidt@metrix.de> wrote:
> Does this work?
>
> class foo
> {
> static $bar = array(1,2,3);
>
> function myFunc()
> {
> print foo::bar;
> }
> }
Hmm I thought with php5 in head :P. Discussing with Alan,
$_GLOBALS['_'.__CLASS__]['staticvars'] should work but I did not test
it.
> > Write unit tests and you can go ahead.
> Do I need to use PHPUnit? Or can a write a small function that asserts
> the results? All I ever get is true or false, so I think PHPUnit is
> not needed...
Yes, PHPUnit will ease automatic tests script.
pierre