![]() ![]() | ![]() |
1.1 misho 1: --TEST-- 2: SPL: FixedArray: overriden count() 3: --FILE-- 4: <?php 5: $obj = new SplFixedArray(2); 6: var_dump(count($obj)); 7: class SplFixedArray2 extends SplFixedArray { 8: public function count() { 9: return -parent::count(); 10: } 11: } 12: $obj = new SplFixedArray2(2); 13: var_dump(count($obj)); 14: ?> 15: --EXPECT-- 16: int(2) 17: int(-2)