|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70226 ReflectionType::isBuiltin reports false for builtin classes
Submitted: 2015-08-10 12:03 UTC Modified: 2015-08-10 12:26 UTC
From: tim_siebels_aurich at yahoo dot de Assigned:
Status: Not a bug Package: Reflection related
PHP Version: 7.0.0beta3 OS: any
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: tim_siebels_aurich at yahoo dot de
New email:
PHP Version: OS:


 [2015-08-10 12:03 UTC] tim_siebels_aurich at yahoo dot de
ReflectionType::isBuiltin checks for the type not being `object`.
That way *objects* that are built in, are considered *not* `Builtin()`

Test script:

function foobar(ReflectionMethod $noType)

$r = new ReflectionFunction('foobar');


Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-08-10 12:24 UTC]
-Status: Open +Status: Not a bug
 [2015-08-10 12:24 UTC]
"Bulitin" refers to a buiting types like array, string etc. It does not tell you whether a class type refers to an internal class or not. You can use ReflectionClass->isInternal()  to determine that.
 [2015-08-10 12:26 UTC]
See also, which contains extensive discussion for how this method should be called.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Dec 06 01:01:27 2023 UTC