|  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
20 + 38 = ?
Subscribe to this entry?

 [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: Fri Dec 08 05:01:29 2023 UTC