Hi,
how about using PHP_Compat ?
for example in register_globals()
we could just do
<?php require_once 'PHP/Compat.php';
PHP_Compat::loadFunction('array_walk_recursive'); array_walk_recursive( $_SERVER, 'strip_tags' ); array_walk_recursive( $_ENV, 'strip_tags' ); ?>
this will improve speed on systems with PHP having this functions natively.
i think there are more places where tis would be a benefit
Hi
On Fri, 09 Dec 2005 09:37:52 +0100 Sebastian Mendel lists@sebastianmendel.de wrote:
how about using PHP_Compat ?
Does it depend on something else in PEAR or we can use it separately? We should probably include it and do not add requirement on PEAR.
Michal Čihař schrieb:
Hi
On Fri, 09 Dec 2005 09:37:52 +0100 Sebastian Mendel lists@sebastianmendel.de wrote:
how about using PHP_Compat ?
Does it depend on something else in PEAR or we can use it separately? We should probably include it and do not add requirement on PEAR.
IMO it does not depend on any other,
it was my intention to include it, and not add requirement for PEAR
On Fri, 09 Dec 2005 13:30:52 +0100 Sebastian Mendel lists@sebastianmendel.de wrote:
Michal Čihař schrieb:
Hi
On Fri, 09 Dec 2005 09:37:52 +0100 Sebastian Mendel lists@sebastianmendel.de wrote:
how about using PHP_Compat ?
Does it depend on something else in PEAR or we can use it separately? We should probably include it and do not add requirement on PEAR.
IMO it does not depend on any other,
it was my intention to include it, and not add requirement for PEAR
Then we have problem with license as PHP_Compat uses PHP license, with some funny conditions like:
5. Redistributions of any form whatsoever must retain the following acknowledgment: "This product includes PHP, freely available from http://www.php.net/".
Michal Čihař a écrit :
On Fri, 09 Dec 2005 13:30:52 +0100 Sebastian Mendel lists@sebastianmendel.de wrote:
Michal Čihař schrieb:
Hi
On Fri, 09 Dec 2005 09:37:52 +0100 Sebastian Mendel lists@sebastianmendel.de wrote:
how about using PHP_Compat ?
Does it depend on something else in PEAR or we can use it separately? We should probably include it and do not add requirement on PEAR.
IMO it does not depend on any other,
it was my intention to include it, and not add requirement for PEAR
Then we have problem with license as PHP_Compat uses PHP license, with some funny conditions like:
- Redistributions of any form whatsoever must retain the following acknowledgment: "This product includes PHP, freely available from http://www.php.net/".
Yes, let's avoid those licensing problems.
Marc
Sebastian Mendel a écrit :
Hi,
how about using PHP_Compat ?
for example in register_globals()
we could just do
<?php require_once 'PHP/Compat.php'; PHP_Compat::loadFunction('array_walk_recursive'); array_walk_recursive( $_SERVER, 'strip_tags' ); array_walk_recursive( $_ENV, 'strip_tags' ); ?>
this will improve speed on systems with PHP having this functions natively.
i think there are more places where tis would be a benefit
Is this to improve the speed instead for this code? Maybe not worthwhile since it's not executed in many cases.
function array_strip_tags(&$item) { if (is_array($item)) { array_walk($item, 'array_strip_tags'); } else { strip_tags($item); } }
array_walk( $_SERVER, 'array_strip_tags' ); array_walk( $_ENV, 'array_strip_tags' );
On Fri, 09 Dec 2005 10:05:31 -0500 Marc Delisle Marc.Delisle@cegepsherbrooke.qc.ca wrote:
Is this to improve the speed instead for this code? Maybe not worthwhile since it's not executed in many cases.
I think the question should be whether to actually perform such actions. $_SERVER and $_ENV are used quite rarely and specific parameters can be handled on place where they are actually used.
Michal Čihař a écrit :
On Fri, 09 Dec 2005 10:05:31 -0500 Marc Delisle Marc.Delisle@cegepsherbrooke.qc.ca wrote:
Is this to improve the speed instead for this code? Maybe not worthwhile since it's not executed in many cases.
I think the question should be whether to actually perform such actions. $_SERVER and $_ENV are used quite rarely and specific parameters can be handled on place where they are actually used.
I agree. So Sebastian, about the removal of the grab_globals script (see my previous post "globals"), your vote please? ....
Marc