xref: /PHP-7.2/ext/spl/tests/fixedarray_018.phpt (revision f60da355)
1--TEST--
2SPL: FixedArray: overriden count()
3--FILE--
4<?php
5$obj = new SplFixedArray(2);
6var_dump(count($obj));
7class SplFixedArray2 extends SplFixedArray {
8    public function count() {
9        return -parent::count();
10    }
11}
12$obj = new SplFixedArray2(2);
13var_dump(count($obj));
14?>
15--EXPECT--
16int(2)
17int(-2)
18