3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyObjectStorage extends SplObjectStorage { public function addAll(SplObjectStorage $object) {} } $o = new MyObjectStorage(); $o2 = new MyObjectStorage(); $o->addAll($o2);
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Deprecated: Return type of MyObjectStorage::addAll(SplObjectStorage $object) should either be compatible with SplObjectStorage::addAll(SplObjectStorage $storage): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /in/7kdDT on line 5
Output for 8.0.0 - 8.0.30
Output for 7.4.0 - 7.4.33
Warning: Declaration of MyObjectStorage::addAll(SplObjectStorage $object) should be compatible with SplObjectStorage::addAll($object) in /in/7kdDT on line 5
Output for 7.0.0 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33
Warning: Declaration of MyObjectStorage::addAll(SplObjectStorage $object) should be compatible with SplObjectStorage::addAll($object) in /in/7kdDT on line 6
Output for 5.4.2 - 5.4.45, 5.5.24 - 5.5.35, 5.6.7 - 5.6.28
Strict Standards: Declaration of MyObjectStorage::addAll() should be compatible with SplObjectStorage::addAll($object) in /in/7kdDT on line 6

preferences:
188.52 ms | 402 KiB | 227 Q