diff options
Diffstat (limited to 'ext/spl/tests/fixedarray_007.phpt')
-rw-r--r-- | ext/spl/tests/fixedarray_007.phpt | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/ext/spl/tests/fixedarray_007.phpt b/ext/spl/tests/fixedarray_007.phpt new file mode 100644 index 0000000..308ce31 --- /dev/null +++ b/ext/spl/tests/fixedarray_007.phpt @@ -0,0 +1,26 @@ +--TEST-- +SPL: FixedArray: Assigning the itself object +--FILE-- +<?php + +$b = 10; +$a = new SplFixedArray($b); + +try { + $a[1] = $a; +} catch (Exception $e) { + echo $e->getMessage(), "\n"; +} + +foreach ($a as $c) { + if ($c) { + echo $c->getSize(), "\n"; + } +} + +print "ok\n"; + +?> +--EXPECT-- +10 +ok |