@@ -19,15 +19,17 @@ var_dump(isset($s[$o2]));
1919var_dump (empty ($ s [$ o2 ]));
2020$ s [$ o2 ] = null ;
2121var_dump ($ s [$ o2 ] ?? new stdClass ());
22- echo "check isset/empty/contains for null. offsetExists returns true as long as the entry is there. \n" ;
22+ echo "check isset/empty/contains/offsetExists for null. offsetExists returns true as long as the entry is there. \n" ;
2323var_dump (isset ($ s [$ o2 ]));
2424var_dump (empty ($ s [$ o2 ]));
2525var_dump ($ s ->contains ($ o2 ));
26- echo "check isset/empty/contains for false. \n" ;
26+ var_dump ($ s ->offsetExists ($ o2 ));
27+ echo "check isset/empty/contains/offsetExists for false. \n" ;
2728$ s [$ o2 ] = false ;
2829var_dump (isset ($ s [$ o2 ]));
2930var_dump (empty ($ s [$ o2 ]));
3031var_dump ($ s ->contains ($ o2 ));
32+ var_dump ($ s ->offsetExists ($ o2 ));
3133try {
3234 $ s ['invalid ' ] = 123 ;
3335} catch (Error $ e ) {
@@ -56,18 +58,24 @@ bool(false)
5658bool(true)
5759object(stdClass)#4 (0) {
5860}
59- check isset/empty/contains for null. offsetExists returns true as long as the entry is there.
61+ check isset/empty/contains/offsetExists for null. offsetExists returns true as long as the entry is there.
6062bool(true)
6163bool(true)
64+
65+ Deprecated: Method SplObjectStorage::contains() is deprecated since 8.5, use method SplObjectStorage::offsetExists() instead in %s on line %d
66+ bool(true)
6267bool(true)
63- check isset/empty/contains for false.
68+ check isset/empty/contains/offsetExists for false.
6469bool(true)
6570bool(true)
71+
72+ Deprecated: Method SplObjectStorage::contains() is deprecated since 8.5, use method SplObjectStorage::offsetExists() instead in %s on line %d
73+ bool(true)
6674bool(true)
6775TypeError: SplObjectStorage::offsetSet(): Argument #1 ($object) must be of type object, string given
6876TypeError: SplObjectStorage::offsetExists(): Argument #1 ($object) must be of type object, string given
6977
70- Notice: Indirect modification of overloaded element of SplObjectStorage has no effect in %s on line 38
78+ Notice: Indirect modification of overloaded element of SplObjectStorage has no effect in %s on line %d
7179object(SplObjectStorage)#1 (1) {
7280 ["storage":"SplObjectStorage":private]=>
7381 array(2) {
0 commit comments