"Greg Beaver" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi Walter,
Hi Greg...
> in PHP 4, you can kludge this:
>
> Class Foo
> {
> function getBaz($set = null)
> {
> static $_TintBaz = 9;
> if (!is_null($set)) {
> $_TintBaz = $set;
>
Hi Walter,
Not until PHP 5
Class Foo
{
static $_TintBaz = 9;
}
echo Foo::$_TintBaz;
in PHP 4, you can kludge this:
Class Foo
{
function getBaz($set = null)
{
static $_TintBaz = 9;
if (!is_null($set)) {
$_TintBaz = $set;
}
return $_TintBaz;
2 matches
Mail list logo