Re: Patches and Extensions and Such

From: Date: Wed, 18 Sep 2002 10:50:53 +0000
Subject: Re: Patches and Extensions and Such
References: 1 2 3  Groups: php.dev 
Request: Send a blank email to php-dev+get-88378@lists.php.net to get a copy of this message
This msg may be sent twice.... Devon O'Dell wrote:
I wonder if you understand that highligh_file() *is* a call to the *same* function that provides .phps files with functionality. By adding line numbers to this function, we are automatically adding them to .phps free of charge. Doesn't break anything or make anything less secure. The only security implications of .phps are user related and are also inherent in files shown with highlight_file. I *really* have no clue about why you say it's half broken. It
Read source and understand how things are sent from PHP/Zend, research issues related to it. IIRC there should be at least one bug report in what condition phps does not work well. I vote -1 for changing/adding phps feature. In other words, no x-application/x-httpd-php-source-with-line-number or like. BTW, if you would like to add extra option to highlight_file(), etc. My vote is 0. People should use highlight_file() instead of phps, anyway. With PHP level, we can forget all issues related to phps.
works fine (except for that extra line number thing, but that's no real problem I'm sure -- the extra line number is also *not* evident in files highlighted by highlight_file() as I don't think you understood) and, if it is not supported by your host, a simple call to highlight_file() is the *exact same thing*. Nowhere in my code is there a regex.
It's not the point, user can do that if they would like to add line numbers. I really don't care much about this issue wheather there is yet another half broken phps with x-application/x-httpd-php-source-with-line-number, I'm just suggesting having one more half broken feature is not nice.
I mean, use highlight_file or .phps or whatever, you're advocating the use of the *exact same functions* in the end. They all eventually break down to zend_highlight().
It's not about the issue calling the same function eventually or not. Again, Research how things should be sent from PHP/Zend. With PHP level, e.g. with scripting, we can forget all issues related to phps. -- Yasuo Ohgaki
Devon Yasuo Ohgaki wrote:
I prefer not to add any more feature to phps. The functoinality should be provided within hilight_file/stirng/etc to avoid needless complexity if it is needed. I've been pointed out reasons why we are better to use functions instead of phps in bug db and/or list sevral times. In short, we are better to use show_source() for better security and management of output. I'm not against having line numbers, but just against adding anymore features to phps. (It's half broken and we don't know when it became fully functional also) But this can be done by a simple regex and loop can add line number can't be? hilight file slipt text by line ending char loop though the array add line number output the result We can do that in PHP or in Scripting. We don't need better performance for these IMHO. Make sense? -- Yasuo Ohgaki


« previous php.dev (#88378) next »