php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #65102 Provide a method to extract the source code of reflected class or method easily
Submitted: 2013-06-23 08:55 UTC Modified: 2021-02-01 16:07 UTC
Votes:2
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: knight at kopernet dot org Assigned: cmb (profile)
Status: Wont fix Package: Reflection related
PHP Version: Irrelevant OS:
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 — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
35 + 27 = ?
Subscribe to this entry?

 
 [2013-06-23 08:55 UTC] knight at kopernet dot org
Description:
------------
I have trouble to extract source of a method or a class easily if the source code is not well formatted.

If the code is well formatted it's easy to extract the source because I can use:
public int ReflectionFunctionAbstract::getStartLine ( void ) and 
public int ReflectionFunctionAbstract::getEndLine ( void ).

But if the source is all in one line the amount of work that is needed to extract the source is overwhelming. Perhaps to do it really robust and realiable I'd have to use the tokenizer extension.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-02-01 16:07 UTC] cmb@php.net
-Status: Open +Status: Wont fix -Assigned To: +Assigned To: cmb
 [2021-02-01 16:07 UTC] cmb@php.net
This doesn't look like something that should go into php-src,
since it is a rather special feature. If you strongly feel that
this feature should be added, please pursue the RFC process[1].

[1] <https://wiki.php.net/rfc/howto>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 16 16:01:28 2024 UTC