> It is not entirely clear how the function treats subclasses. Does it > count > only the *direct* instances of a class, or does it also count the > instances > of subclasses? > > class A {} > class B extends A {} > > echo get_objects_count('A'); > // 0 > > $a = new B; > > echo $a instanceof A; > // 1 (true) > > echo get_objects_count('A'); > // ??? - 0 or 1 ? > > > > Lazare Inepologlou > Ingénieur Logiciel
Short answer: only direct instances, so the result is 0! Added your question+answer to the RFC. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php