xref: /PHP-8.2/ext/spl/tests/bug61326.phpt (revision 902d6439)
1--TEST--
2Bug #61326: ArrayObject comparison
3--FILE--
4<?php
5$aobj1 = new ArrayObject(array(0));
6$aobj2 = new ArrayObject(array(1));
7var_dump($aobj1 == $aobj2);
8
9$aobj3 = new ArrayObject(array(0));
10var_dump($aobj1 == $aobj3);
11
12$aobj3->foo = 'bar';
13var_dump($aobj1 == $aobj3);
14?>
15--EXPECTF--
16bool(false)
17bool(true)
18
19Deprecated: Creation of dynamic property ArrayObject::$foo is deprecated in %s on line %d
20bool(false)
21