Re: [PHP-DEV] fgetss_state - seemingly unused
On 2002-03-19 16:40:51, Rasmus Lerdorf wrote: This is a remnant from my original implementation in PHP 2. It was committed: Mon May 20 15:20:25 1996 (5 years, 10 months ago) Some code never goes away ;-) ... Having that level of revision history is actually pretty cool if you ask me. This is the diff: Yes, it's really nice to have such a long history. So it did actually make sense at one point. It has just sort of lost its way over the years. So it should be save to remove the *getss_state variables? Stefan -- Stefan Röhrich [EMAIL PROTECTED], [EMAIL PROTECTED] http://www.roehri.ch/~sr/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] fgetss_state - seemingly unused
It is safe to remove, yes, since it doesn't do anything anymore. However, the original function was able to parse multi-line tags correctly which the current one no longer does. So instead of just removing it, we should consider re-introducing that feature. -Rasmus On Wed, 20 Mar 2002, Stefan Roehrich wrote: On 2002-03-19 16:40:51, Rasmus Lerdorf wrote: This is a remnant from my original implementation in PHP 2. It was committed: Mon May 20 15:20:25 1996 (5 years, 10 months ago) Some code never goes away ;-) ... Having that level of revision history is actually pretty cool if you ask me. This is the diff: Yes, it's really nice to have such a long history. So it did actually make sense at one point. It has just sort of lost its way over the years. So it should be save to remove the *getss_state variables? Stefan -- Stefan Röhrich [EMAIL PROTECTED], [EMAIL PROTECTED] http://www.roehri.ch/~sr/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] fgetss_state - seemingly unused
It was my intention to put the state into the stream structure and nuke the global, so that the state is per stream, which makes a bit more sense since running two fgetss() in parallel would get confused otherwise. Are there problems with that? --Wez. On 20/03/02, Rasmus Lerdorf [EMAIL PROTECTED] wrote: It is safe to remove, yes, since it doesn't do anything anymore. However, the original function was able to parse multi-line tags correctly which the current one no longer does. So instead of just removing it, we should consider re-introducing that feature. -Rasmus On Wed, 20 Mar 2002, Stefan Roehrich wrote: On 2002-03-19 16:40:51, Rasmus Lerdorf wrote: This is a remnant from my original implementation in PHP 2. It was committed: Mon May 20 15:20:25 1996 (5 years, 10 months ago) Some code never goes away ;-) ... Having that level of revision history is actually pretty cool if you ask me. This is the diff: Yes, it's really nice to have such a long history. So it did actually make sense at one point. It has just sort of lost its way over the years. So it should be save to remove the *getss_state variables? Stefan -- Stefan Röhrich [EMAIL PROTECTED], [EMAIL PROTECTED] http://www.roehri.ch/~sr/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] fgetss_state - seemingly unused
That sounds good. On Wed, 20 Mar 2002, Wez Furlong wrote: It was my intention to put the state into the stream structure and nuke the global, so that the state is per stream, which makes a bit more sense since running two fgetss() in parallel would get confused otherwise. Are there problems with that? --Wez. On 20/03/02, Rasmus Lerdorf [EMAIL PROTECTED] wrote: It is safe to remove, yes, since it doesn't do anything anymore. However, the original function was able to parse multi-line tags correctly which the current one no longer does. So instead of just removing it, we should consider re-introducing that feature. -Rasmus On Wed, 20 Mar 2002, Stefan Roehrich wrote: On 2002-03-19 16:40:51, Rasmus Lerdorf wrote: This is a remnant from my original implementation in PHP 2. It was committed: Mon May 20 15:20:25 1996 (5 years, 10 months ago) Some code never goes away ;-) ... Having that level of revision history is actually pretty cool if you ask me. This is the diff: Yes, it's really nice to have such a long history. So it did actually make sense at one point. It has just sort of lost its way over the years. So it should be save to remove the *getss_state variables? Stefan -- Stefan Röhrich [EMAIL PROTECTED], [EMAIL PROTECTED] http://www.roehri.ch/~sr/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] fgetss_state - seemingly unused
On 2002-03-20 04:51:35, Rasmus Lerdorf wrote: That sounds good. On Wed, 20 Mar 2002, Wez Furlong wrote: It was my intention to put the state into the stream structure and nuke the global, so that the state is per stream, which makes a bit more sense since running two fgetss() in parallel would get confused otherwise. Yes, it really sounds like a good idea, and I'm sure that there will be more ideas, how stream state variables can be used ;-). Stefan -- Stefan Röhrich [EMAIL PROTECTED], [EMAIL PROTECTED] http://www.roehri.ch/~sr/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] fgetss_state - seemingly unused
On 2002-03-18 23:23:00, Wez Furlong wrote: Does anyone know what purpose FG(fgetss_state) serves? As I remember it holds the internal state of php_strip_tags. It doesn't appear to do anything other than hold the value 0 for php_strip_tags. Is this an oversight or a leftover of some old code? I doesn't look like the code has changed, the state ist always initialized to 0, but it's used in php_strip_tags to maintain the state between invocations from calls of {f,gz}getss(). Stefan -- Stefan Röhrich [EMAIL PROTECTED], [EMAIL PROTECTED] http://www.roehri.ch/~sr/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] fgetss_state - seemingly unused
This is a remnant from my original implementation in PHP 2. It was committed: Mon May 20 15:20:25 1996 (5 years, 10 months ago) Having that level of revision history is actually pretty cool if you ask me. This is the diff: http://cvs.php.net/diff.php/phpfi/src/file.c?r1=1.13r2=1.14ty=u So it did actually make sense at one point. It has just sort of lost its way over the years. -Rasmus On Tue, 19 Mar 2002, Stefan Roehrich wrote: On 2002-03-19 21:35:09, Wez Furlong wrote: Well, that appears to be the intention, but I couldn't see a single line where the state variable is assigned to; it's passed by value, so I can't see how FG(fgetss_state) is ever set to a value other than 0? Ups, this really looks like an oversight or a leftover from old code, but I just looked at the cvs changelog and didn't see anything on a quick glance. Maybe the state vars should be removed, the code is really old and nobody has complained until now (but passing by reference seems to be the intended version). Stefan -- Stefan Röhrich [EMAIL PROTECTED], [EMAIL PROTECTED] http://www.roehri.ch/~sr/ -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] fgetss_state - seemingly unused
Hey, Does anyone know what purpose FG(fgetss_state) serves? It doesn't appear to do anything other than hold the value 0 for php_strip_tags. Is this an oversight or a leftover of some old code? The zlib extension has it's own equivalent that also does nothing. Are they safe to nuke? --Wez. -- PHP Development Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php