[PHP-DEV] [patch] expose PHP version details as constants

2008-02-08 Thread Pierre Joye
Hi, Testing the PHP version can be much easier and faster if the versions details were exposed via the constants, like what we use internally. This little patch expose what we have in php_version.h #define PHP_MAJOR_VERSION 5 #define PHP_MINOR_VERSION 2 #define PHP_RELEASE_VERSION 6 #define PHP_

Re: [PHP-DEV] magic_quotes and the question of BC

2008-02-08 Thread Lukas Kahwe Smith
On 08.02.2008, at 17:46, Pierre Joye wrote: On Feb 8, 2008 5:38 PM, Gregory Beaver <[EMAIL PROTECTED]> wrote: Frankly, I don't see why there is any vote whatsoever. It's plain stupid to consider removing them when a fully backwards-compatible solution exists that has no performance penalty,

Re: [PHP-DEV] [patch] expose PHP version details as constants

2008-02-08 Thread Stanislav Malyshev
Hi! Testing the PHP version can be much easier and faster if the versions details were exposed via the constants, like what we use internally. This little patch expose what we have in php_version.h Looks ok, shouldn't harm anything. -- Stanislav Malyshev, Zend Software Architect [EMAIL PROTEC

Re: [PHP-DEV] get_magic_quotes_gpc, get-magic-quotes-runtime in head, get a "final" decision

2008-02-08 Thread Sam Barrow
On Fri, 2008-02-08 at 10:42 -0600, Brian Moon wrote: > Richard Quadling wrote: > > Aren't some things just worth the BC break? > > > > Having never used them, I can quite happily say bomb the bastards! > > Agreed. For Phorum will just change our code from: > > if ( get_magic_quotes_gpc() ) { >

Re: [PHP-DEV] magic_quotes and the question of BC

2008-02-08 Thread Pierre Joye
On Feb 8, 2008 5:38 PM, Gregory Beaver <[EMAIL PROTECTED]> wrote: > Frankly, I don't see why there is any vote whatsoever. It's plain > stupid to consider removing them when a fully backwards-compatible > solution exists that has no performance penalty, no security penalty, > and in fact no penal

Re: [PHP-DEV] get_magic_quotes_gpc, get-magic-quotes-runtime in head, get a "final" decision

2008-02-08 Thread Brian Moon
Richard Quadling wrote: Aren't some things just worth the BC break? Having never used them, I can quite happily say bomb the bastards! Agreed. For Phorum will just change our code from: if ( get_magic_quotes_gpc() ) { to: if ( function_exists(get_magic_quotes_gpc) && get_magic_quotes_gpc()

[PHP-DEV] magic_quotes and the question of BC

2008-02-08 Thread Gregory Beaver
Hello all, Those of you who are saying things like "forget the idiots using magic_quotes" need to understand more clearly what is being proposed. NOBODY is proposing keeping magic_quotes. As of PHP 5.3 and earlier, all applications worth an ounce of anything must check for and handle magic_quotes

Re: [PHP-DEV] [patch] expose PHP version details as constants

2008-02-08 Thread David Coallier
On Feb 8, 2008 7:52 AM, Pierre Joye <[EMAIL PROTECTED]> wrote: > Hi, > > Testing the PHP version can be much easier and faster if the versions > details were exposed via the constants, like what we use internally. > This little patch expose what we have in php_version.h > > > #define PHP_MAJOR_VERS

Re: [PHP-DEV] get_magic_quotes_gpc, get-magic-quotes-runtime in head, get a "final" decision

2008-02-08 Thread Pierre Joye
On Feb 8, 2008 1:26 PM, Tomas Kuliavas <[EMAIL PROTECTED]> wrote: > >> So I guess I'm -1: Restore them, always return false, and throw > >> E_DEPRECATED. > > > > But this was about them being in PHP 6, not PHP 5.. > > If magic_quotes_* is gone, so should anything else even remotely related > > to t

Re: [PHP-DEV] get_magic_quotes_gpc, get-magic-quotes-runtime in head, get a "final" decision

2008-02-08 Thread Tomas Kuliavas
>> So I guess I'm -1: Restore them, always return false, and throw >> E_DEPRECATED. > > But this was about them being in PHP 6, not PHP 5.. > If magic_quotes_* is gone, so should anything else even remotely related > to them be gone. You have to fix your code anyway for it to work in PHP > 6 (or ev

Re: [PHP-DEV] get_magic_quotes_gpc, get-magic-quotes-runtime in head, get a "final" decision

2008-02-08 Thread Jani Taskinen
On Thu, 2008-02-07 at 23:32 -0600, Larry Garfield wrote: > On Thursday 07 February 2008, Lukas Kahwe Smith wrote: > > On 07.02.2008, at 00:59, Pierre Joye wrote: > > > Hi Andi, > > > > > > On Feb 7, 2008 12:56 AM, Andi Gutmans <[EMAIL PROTECTED]> wrote: > > >> -1 > > >> > > >> Suggestion to enhance

Re: [PHP-DEV] get_magic_quotes_gpc, get-magic-quotes-runtime in head, get a "final" decision

2008-02-08 Thread Sam Barrow
On Fri, 2008-02-08 at 13:48 +0100, Pierre Joye wrote: > On Feb 8, 2008 1:26 PM, Tomas Kuliavas <[EMAIL PROTECTED]> wrote: > > >> So I guess I'm -1: Restore them, always return false, and throw > > >> E_DEPRECATED. > > > > > > But this was about them being in PHP 6, not PHP 5.. > > > If magic_quotes

Re: [PHP-DEV] get_magic_quotes_gpc, get-magic-quotes-runtime in head, get a "final" decision

2008-02-08 Thread Jani Taskinen
On Fri, 2008-02-08 at 14:26 +0200, Tomas Kuliavas wrote: > >> So I guess I'm -1: Restore them, always return false, and throw > >> E_DEPRECATED. > > > > But this was about them being in PHP 6, not PHP 5.. > > If magic_quotes_* is gone, so should anything else even remotely related > > to them be go

Re: [PHP-DEV] get_magic_quotes_gpc, get-magic-quotes-runtime in head, get a "final" decision

2008-02-08 Thread Pierre Joye
Hi! On Feb 8, 2008 2:31 PM, Sam Barrow <[EMAIL PROTECTED]> wrote: > I say throw them out. Magic quotes are easy to simulate 100%. I could cry by reading this sentence ;) -- Pierre http://blog.thepimp.net | http://www.libgd.org -- PHP Internals - PHP Runtime Development Mailing List To unsubs

Re: [PHP-DEV] nowdocs again

2008-02-08 Thread Markus Fischer
Hi, chris# wrote: $var = [[[HERE Is just another idea HERE I don't like it because this easily breaks editors detecting of starting/ending brackets. Advanced editors allow jumping forth/back between start/ending brackets and this would break it. - Markus -- PHP Internals - PHP Runtime Dev

Re: [PHP-DEV] get_magic_quotes_gpc, get-magic-quotes-runtime in head, get a "final" decision

2008-02-08 Thread Richard Quadling
On 08/02/2008, Pierre Joye <[EMAIL PROTECTED]> wrote: > On Feb 8, 2008 1:26 PM, Tomas Kuliavas <[EMAIL PROTECTED]> wrote: > > >> So I guess I'm -1: Restore them, always return false, and throw > > >> E_DEPRECATED. > > > > > > But this was about them being in PHP 6, not PHP 5.. > > > If magic_quotes

Re: [PHP-DEV] get_magic_quotes_gpc, get-magic-quotes-runtime inhead, get a "final" decision

2008-02-08 Thread Edward Z. Yang
Sam Barrow wrote: > Or use a compatibility function. I use this one: > > if (version_compare(phpversion(), $version) === 6) { > function get_magic_quotes_gpc() { > return false; > } > } Ehh, I don't understand: how does that code work at all? (unless version_compare() ch