php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #15208 .phps file additional feature
Submitted: 2002-01-24 12:32 UTC Modified: 2021-05-26 12:20 UTC
Votes:98
Avg. Score:4.6 ± 0.8
Reproduced:34 of 34 (100.0%)
Same Version:27 (79.4%)
Same OS:27 (79.4%)
From: tim at timcrider dot com Assigned:
Status: Wont fix Package: Scripting Engine problem
PHP Version: 5.0.0 OS: all
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:
43 - 38 = ?
Subscribe to this entry?

 
 [2002-01-24 12:32 UTC] tim at timcrider dot com
It would be very helpful if you had a php.ini directive like:

php_source_view_linenum = 0/1

 If it is set to '1', a .phps file would print the line number in front of the colorized syntax. It's not a huge feature, but would be very nice to help debug some code, or help others see the logic of code.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-06 21:09 UTC] iliaa@php.net
This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.

There is no ini settings, however as of PHP 4.3.0 you can passd a string via GET that will enable the display of line numbers.
 [2003-02-07 11:59 UTC] philip@php.net
This was never implemented/committed.  Here's a thread:
http://marc.theaimsgroup.com/?l=php-dev&m=103239898231495

And here's a patch:
http://www.dapond.net/code/zend_highlight.patch

 [2003-02-07 13:58 UTC] philip@php.net
To add.  That looong thread ends with this comment by Zeev as certain conditions with that patch cause a segfault:

"I'll try to find some time to look at it.  I need to
re-familiarize myself with the output buffering code at 
some point anyway..."

So, I suppose this should be assigned to Zeev.  And it is, now.
 [2004-01-17 21:42 UTC] stuart_gibson at hotmail dot com
I definetly feel this should be a feature with PHP. I use highlight_file() a lot and it's hard to debug code when you have to count line numbers yourself. It would be great if PHP source code could be line numbered; it would save me a great deal of time, especially the time It's taken to try and find a tempory alternate...
 [2010-12-31 20:36 UTC] jani@php.net
-Package: Feature/Change Request +Package: *General Issues -Assigned To: zeev +Assigned To:
 [2010-12-31 20:37 UTC] jani@php.net
-Package: *General Issues +Package: Scripting Engine problem
 [2017-10-23 00:39 UTC] kalle@php.net
-Status: Open +Status: Analyzed
 [2021-05-26 12:20 UTC] krakjoe@php.net
-Status: Analyzed +Status: Wont fix
 [2021-05-26 12:20 UTC] krakjoe@php.net
At the time this request was opened, it may have been commonplace to use highlight_file as part of error handling.

Today, it's highly discouraged to expose the source code of any application for any reason.

As such, it doesn't make much sense to extend this function in any direction.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 13:01:28 2024 UTC