php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #52575 Would like get_called_class() without namespace.
Submitted: 2010-08-10 17:11 UTC Modified: 2017-03-11 18:00 UTC
Votes:8
Avg. Score:3.9 ± 1.1
Reproduced:7 of 7 (100.0%)
Same Version:3 (42.9%)
Same OS:1 (14.3%)
From: atrauzzi at gmail dot com Assigned:
Status: Wont fix Package: Reflection related
PHP Version: Irrelevant OS: Ubuntu 10.04
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: atrauzzi at gmail dot com
New email:
PHP Version: OS:

 

 [2010-08-10 17:11 UTC] atrauzzi at gmail dot com
Description:
------------
It might be nice to have an optional boolean added to this and similar functions so that class names can be returned without the namespace prefixed on it.

This could help to save on string manipulation code as well as repeated calls to the function to perform the manipulation.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-08-11 00:18 UTC] felipe@php.net
-Type: Bug +Type: Feature/Change Request
 [2017-03-11 18:00 UTC] nikic@php.net
-Status: Open +Status: Wont fix
 [2017-03-11 18:00 UTC] nikic@php.net
Marking as Won't Fix as I don't see reason to implement such an option on a specific function: many places in PHP return class names, and we certainly do not want to add boolean flags everywhere. Please stick with the string manipulation, it's just one line of code.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 13:01:30 2024 UTC