Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
SPLObjecStorage 中的 Detach() 和 offsetUnset() 之间有什么区别。看起来他们做同样的事情。如果是这样,为什么同一工作有两种方法?
绝对没有区别,一个是另一个的别名:
笔记: SplObjectStorage::offsetUnset() 是 SplObjectStorage::detach() 的别名。
笔记:
SplObjectStorage::offsetUnset() 是 SplObjectStorage::detach() 的别名。