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
 [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 12:01:30 2024 UTC