php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #50704 SplSubject and SplObserver are NOT classes, they are interfaces.
Submitted: 2010-01-09 01:26 UTC Modified: 2010-01-09 11:17 UTC
From: jasonwyz79 at gmail dot com Assigned: kalle (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: Ubuntu 9.04
Private report: No CVE-ID: None
 [2010-01-09 01:26 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-01-09 11:16 UTC] svn@php.net
Automatic comment from SVN on behalf of degeberg
Revision: http://svn.php.net/viewvc/?view=revision&revision=293316
Log: Fixes #50704.
 [2010-01-09 11:17 UTC] degeberg@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 12:00:02 2026 UTC