php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #50552 Add function to get all used namespaces
Submitted: 2009-12-22 02:53 UTC Modified: 2010-11-24 09:50 UTC
Votes:7
Avg. Score:3.6 ± 1.8
Reproduced:5 of 5 (100.0%)
Same Version:2 (40.0%)
Same OS:2 (40.0%)
From: kristopherwilson at gmail dot com Assigned:
Status: Open Package: Scripting Engine problem
PHP Version: * OS: *
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.
Password:
Status:
Package:
Bug Type:
Summary:
From: kristopherwilson at gmail dot com
New email:
PHP Version: OS:

 

 [2009-12-22 02:53 UTC] kristopherwilson at gmail dot com
Description:
------------
Provide a function for returning all namespaces used in the current request to aid in autoloading. 

Reproduce code:
---------------
<?php
    use My\Namespace;
    use Other\Namespace;

    print_r(get_used_namespaces());
?>

Expected result:
----------------
Array(
    [0] = My\Namespace,
    [1] = Other\Namespace
)

Actual result:
--------------
No such function exists.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-11-24 09:50 UTC] jani@php.net
-Package: Feature/Change Request +Package: Scripting Engine problem -Operating System: Any +Operating System: * -PHP Version: 5.3.1 +PHP Version: *
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Dec 12 06:01:24 2019 UTC