FWIW:
There is a proposal to add a runtime option to view
line numbers in the source, something like:
http://www.example.com/hi.phps?SHOW_LINENUMBERS
In fact, some even thought it was applied but alas
it never was. There is a little information on this
feature request here:
http://bugs.ph
I suspect that is because of the regex code evaluation; but thanks for the
suggestion anyway.
BTW, I found a way to speed (my version) even more, something that I still
forget to use on a regular basis but has been proven to be ~extremely~ good
at boosting speed:
replace:
for ($i = 0; $i < c
This also works the same, for comparisons sake, but your solution
benchmarks faster:
$i=2;
$fp = fopen($url,'r');
$file = fread($fp,filesize($url));
$file = highlight_string($file,TRUE);
$file = str_replace('','1',$file);
$file = preg_replace('//e','sprintf("%05d ",$i++)',$file);
echo "";
3 matches
Mail list logo