Esempio n. 1
0
 static function StaticFields()
 {
     Timing::Start("Static field direct read");
     for ($i = 0; $i < self::LOOP_COUNT; $i++) {
         $_x = Z::$a;
     }
     Timing::Stop();
     Timing::Start("Static field direct write");
     for ($i = 0; $i < self::LOOP_COUNT; $i++) {
         Z::$a = $_x;
     }
     Timing::Stop();
     $_y = "a";
     Timing::Start("Static field indirect read");
     for ($i = 0; $i < self::LOOP_COUNT; $i++) {
         $_x = Z::${$_y};
     }
     Timing::Stop();
     $_y = "a";
     Timing::Start("Static field indirect write");
     for ($i = 0; $i < self::LOOP_COUNT; $i++) {
         Z::${$_y} = $_x;
     }
     Timing::Stop();
 }