All pastes #563964 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-06-13 11:34 UTC
rendered paste body
<?php
class A{
   function b($c) {
     static $d;
     if (!$d) {
       $d = $c;
     }
     echo $d . "\n";
   }
}

$a = new A();
$b = new A();

$a->b(1);
$a->b(2);
$b->b(3);
?>



cweiske:~> php test.php
1
1
1