# phps line numbering

- Thread: https://externals.io/message/22453
- Original archive: https://news-web.php.net/php.internals/22453
- Started by Kevin Waterson on 2006-03-15T14:02:10+00:00
- Messages: 13
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #22453 — Kevin Waterson — 2006-03-15T14:02:10+00:00

URL: https://externals.io/message/22453#22453

Addition of line numbering to phps
This is a rather simple addition and will be benificial to all who use phps
for debugging and/or displaying code. Its a simple diff to zend_highlight.c

Patches have been written and languish simply awaiting inclusion in HEAD

Can we have a show of hands of those who would like this?
5.1 patch can be viewed here:
http://svn.schlueters.de/phpatches/PHP_5_1/zend_highlight_ol.diff

Any real reason this cannot be included?

Kind regards
kevin

-- 
"Democracy is two wolves and a lamb voting on what to have for lunch. 
Liberty is a well-armed lamb contesting the vote."

---

## #22454 — Ilia Alshanetsky — 2006-03-15T14:46:12+00:00

URL: https://externals.io/message/22453#22454 · In reply to: #22453

I'd consider it for PHP6, but not for PHP5.1 at least not at this time.

Ilia

Kevin Waterson wrote:
> Addition of line numbering to phps
> This is a rather simple addition and will be benificial to all who use phps
> for debugging and/or displaying code. Its a simple diff to zend_highlight.c
> 
> Patches have been written and languish simply awaiting inclusion in HEAD
> 
> Can we have a show of hands of those who would like this?
> 5.1 patch can be viewed here:
> http://svn.schlueters.de/phpatches/PHP_5_1/zend_highlight_ol.diff
> 
> Any real reason this cannot be included?
> 
> Kind regards
> kevin

---

## #22455 — Johannes Schlueter — 2006-03-15T14:52:35+00:00

URL: https://externals.io/message/22453#22455 · In reply to: #22454

Hi Ilia et al.,

the patch is older than PHP 6 and back then there was nobody interested in 
committing it so it wasn't brought to HEAD, yet. But I'll do that if the 
patch itself is being accepted.

johannes


> I'd consider it for PHP6, but not for PHP5.1 at least not at this time.
>
> Ilia
>
> Kevin Waterson wrote:
> > […]

---

## #22456 — Pierre — 2006-03-15T14:56:51+00:00

URL: https://externals.io/message/22453#22456 · In reply to: #22454

> I'd consider it for PHP6, but not for PHP5.1 at least not at this time.

I'm definitively for having it in php6. For 5.x, if there is a 5.2, 
then it could be in too.

--Pierre

---

## #22457 — Florian Anderiasch — 2006-03-15T15:05:52+00:00

URL: https://externals.io/message/22453#22457 · In reply to: #22453

Kevin Waterson schrieb:
> Addition of line numbering to phps
> This is a rather simple addition and will be benificial to all who use phps
> for debugging and/or displaying code. Its a simple diff to zend_highlight.c

Hello Kevin,
I haven't tested this - but if phps output is numbered, it will be
completely cluttered and you can't copy-paste anymore. Exactly when
*displaying* code so that people can adapt it that's a quite bad idea
then imho. Rather add another extension and leave .phps like it is.

Greetings,
Florian

---

## #22458 — Florian Anderiasch — 2006-03-15T15:14:59+00:00

URL: https://externals.io/message/22453#22458 · In reply to: #22457

arg, I'm wrong - ignore me please

---

## #22459 — Aizat Faiz — 2006-03-15T15:33:34+00:00

URL: https://externals.io/message/22453#22459 · In reply to: #22453

How about including the patch, and having a php.ini option to 
enable/disable the line numbering.

Kevin Waterson wrote:
> Addition of line numbering to phps
> This is a rather simple addition and will be benificial to all who use phps
> for debugging and/or displaying code. Its a simple diff to zend_highlight.c
> 
> Patches have been written and languish simply awaiting inclusion in HEAD
> 
> Can we have a show of hands of those who would like this?
> 5.1 patch can be viewed here:
> http://svn.schlueters.de/phpatches/PHP_5_1/zend_highlight_ol.diff
> 
> Any real reason this cannot be included?
> 
> Kind regards
> kevin
> 


-- 
aizat faiz: sleep to the power of z. -_-;;^zzz
strange symphonies - http://aizatto.com/

---

## #22460 — Derick Rethans — 2006-03-15T15:47:39+00:00

URL: https://externals.io/message/22453#22460 · In reply to: #22459

> How about including the patch, and having a php.ini option to enable/disable
> the line numbering.

NO more ini settings please... and definitely not for something trivial 
as this.

Derick
-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

---

## #22461 — Sean Coates — 2006-03-15T15:50:23+00:00

URL: https://externals.io/message/22453#22461 · In reply to: #22453

> Patches have been written and languish simply awaiting inclusion in HEAD

Johannes' method (<ol><li>...</li>...</ol>) doesn't copy & paste well in
FireFox 1.5 -- you might consider this a FF problem, but in any case,
line numbers are pasted, so this is really a pain for sharing code.

Until a good method is found (if there is one), I say leave the patch
out -- although, FWIW, I _would_ like to see line numbers if there's a
way to make it work well (avoid horizontal scrolling, paste without
numbers).

S

---

## #22462 — Lukas Smith — 2006-03-15T16:04:20+00:00

URL: https://externals.io/message/22453#22462 · In reply to: #22454

Ilia Alshanetsky wrote:
> I'd consider it for PHP6, but not for PHP5.1 at least not at this time.

what exactly is the big deal with adding a new optional parameter?
i dont really see the huge impact that should push this feature back to 
the next major php version. its something that could go into any minor 
version.

regards,
Lukas

---

## #22464 — Lukas Smith — 2006-03-15T16:16:39+00:00

URL: https://externals.io/message/22453#22464 · In reply to: #22462

Lukas Smith wrote:
> Ilia Alshanetsky wrote:
> > […]
> 
> what exactly is the big deal with adding a new optional parameter?
> i dont really see the huge impact that should push this feature back to 
> the next major php version. its something that could go into any minor 
> version.

maybe i should clarify that i am only concered about the 
highlight_file(9 and `highlight_string()` functions. i dont even think we 
should add linenumbers to .phps.

regards,
Lukas

---

## #22470 — Kevin Waterson — 2006-03-15T20:51:27+00:00

URL: https://externals.io/message/22453#22470 · In reply to: #22459

This one time, at band camp, Aizat Faiz <aizat.faiz@gmail.com> wrote:

> How about including the patch, and having a php.ini option to 
> enable/disable the line numbering.

I dont think this is a good option, perhaps some other trigger
file.phps?numbers or something

Kevin


-- 
"Democracy is two wolves and a lamb voting on what to have for lunch. 
Liberty is a well-armed lamb contesting the vote."

---

## #22471 — Matthew C. Kavanagh — 2006-03-15T21:53:25+00:00

URL: https://externals.io/message/22453#22471 · In reply to: #22470

That other time, at band camp, Kevin Waterson wrote:
> This one time, at band camp, Aizat Faiz <aizat.faiz@gmail.com> wrote:
> > […]
> 
> I dont think this is a good option, perhaps some other trigger
> file.phps?numbers or something

But there'd better be an ini option to disable that, and an ini option 
to control whether line numbering starts at zero or one, and an ini 
option to disable the ini options. Everyone loves ini options :)
