php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #75376 ReflectionClass::getParentClass() can return null
Submitted: 2017-10-13 20:37 UTC Modified: 2018-01-28 13:12 UTC
From: benjamin dot morel at gmail dot com Assigned: vrana (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: N/A
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: benjamin dot morel at gmail dot com
New email:
PHP Version: OS:

 

 [2017-10-13 20:37 UTC] benjamin dot morel at gmail dot com
Description:
------------
When a class has no parent, ReflectionClass::getParentClass() returns NULL. It would be nice to document this:

http://php.net/manual/en/reflectionclass.getparentclass.php

Expected result:
----------------
public ReflectionClass|null ReflectionClass::getParentClass ( void )

Actual result:
--------------
public ReflectionClass ReflectionClass::getParentClass ( void )

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-01-28 13:11 UTC] vrana@php.net
Automatic comment from SVN on behalf of vrana
Revision: http://svn.php.net/viewvc/?view=revision&revision=344004
Log: Document null return value (bug #75376)
 [2018-01-28 13:12 UTC] vrana@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: vrana
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Oct 08 10:00:01 2026 UTC