Hi,
If "register_globals" is enabled in php.ini, PHP have to make a copy for global var. Beyond unsafe it affects the performance of the PHP. But how much performance do one lose setting it this way?
Thanks for your time.
Regards,
Scorphus.
register_globals and performance
Moderator: General Moderators
Not sure, but I hardly think that the performance difference between the two would be drastic...
You could test it by:
...or something after rewriting it, and then try submitting it with and withought register_globals...
You could test it by:
Code: Select all
<?php
function getmicrotime(){
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
$time_start = getmicrotime();
?>
<form methof="post">
<input type="submit">
<?php
for ($i=1;$i<2000;$i++) {
echo '<input type="text" name="somename[]" value="Current val: '.$i.'">';
}
?>
</form>
<?php
$time_end = getmicrotime();
$time = $time_end - $time_start;
echo "Took $time seconds";
?>