#50704 [Opn->Asn]: SplSubject and SplObserver are NOT classes, they are interfaces.
| From: | kalle@php.net | Date: | Sat, 09 Jan 2010 04:27:24 +0000 |
| Subject: | #50704 [Opn->Asn]: SplSubject and SplObserver are NOT classes, they are interfaces. | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-3657@lists.php.net to get a copy of this message | ||
ID: 50704
Updated by: kalle@php.net
Reported By: jasonwyz79 at gmail dot com
-Status: Open
+Status: Assigned
Bug Type: Documentation problem
Operating System: Ubuntu 9.04
PHP Version: Irrelevant
-Assigned To:
+Assigned To: kalle
Previous Comments:
------------------------------------------------------------------------
[2010-01-09 01:26:21] jasonwyz79 at gmail dot com
Description:
------------
The following pages in the documentation states that "SplSubject" and
"SplObserver" are classes when in fact they are interfaces.
http://php.net/class.splsubject
http://php.net/class.splobserver
Reproduce code:
---------------
1: echo class_exists( 'SplSubject' ) ? 'SplSubject is a class' :
'SplSubject is NOT a class';
2: echo interface_exists( 'SplSubject' ) ? 'SplSubject is an interface'
: 'SplSubject is NOT an interface';
3: echo class_exists( 'SplObserver' ) ? 'SplObserver is a class' :
'SplObserver is NOT a class';
4: echo interface_exists( 'SplObserver' ) ? 'SplObserver is an
interface' : 'SplObserver is NOT an interface';
Expected result:
----------------
1: SplSubject is NOT a class
2: SplSubject is an interface
3: SplObserver is NOT a class
4: SplObserver is an interface
Actual result:
--------------
1: SplSubject is NOT a class
2: SplSubject is an interface
3: SplObserver is NOT a class
4: SplObserver is an interface
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50704&edit=1