Connecting Tech Pros Worldwide Forums | Help | Site Map

PHP5 questions

Philipp Lenssen
Guest
 
Posts: n/a
#1: Jul 17 '05
I noticed there's an error in PHP when it receives form data. It seems
to precede various characters with "\". I was wondering if that's about
to get fixed in PHP5, or already is fixed in PHP4? (Or is this somehow
not an error?)

Also, I was wondering when/ if PHP will include more object-oriented
functions, like $myString.replace($find, $replaceWith). (I sometimes
wonder if I need to use the first or second or third parameter or what
and it takes some more seconds to check PHP.net.)

Next, are there any plans to remove the "$" in front of variables?

Also: will XPath be supported internally/ by standard libraries (I use
a special library not part of PHP and it could be a little faster)?

Will there be real private members/ functions in PHP5 when using
classes/ objects? (And any plans to drop "$this->", not that it's
really bad?)


Thanks for any info. (I read through the changes log of PHP5, by the
way.)

Pedro Graca
Guest
 
Posts: n/a
#2: Jul 17 '05

re: PHP5 questions


Philipp Lenssen wrote:[color=blue]
> I noticed there's an error in PHP when it receives form data. It seems
> to precede various characters with "\". I was wondering if that's about
> to get fixed in PHP5, or already is fixed in PHP4? (Or is this somehow
> not an error?)[/color]

Maybe you have magic_quotes_* set in php.ini

Try this with both php4 and php5

<?php
$mq = array('magic_quotes_gpc', 'magic_quotes_runtime');
foreach ($mq as $x) {
echo "$x is ", ini_get($x), "<br/>\n";
}
?>

[color=blue]
> [...]
> Thanks for any info. (I read through the changes log of PHP5, by the
> way.)[/color]

Don't know about your other questions :(


--
..sig
Matthias Esken
Guest
 
Posts: n/a
#3: Jul 17 '05

re: PHP5 questions


"Philipp Lenssen" <info@outer-court.com> schrieb:
[color=blue]
> I noticed there's an error in PHP when it receives form data. It seems
> to precede various characters with "\". I was wondering if that's about
> to get fixed in PHP5, or already is fixed in PHP4? (Or is this somehow
> not an error?)[/color]

No, this is no error. You might have activated magic_quotes in your
php.ini. If you want to continue this, then use stripslashes() with the
incoming data.
[color=blue]
> Also, I was wondering when/ if PHP will include more object-oriented
> functions, like $myString.replace($find, $replaceWith). (I sometimes
> wonder if I need to use the first or second or third parameter or what
> and it takes some more seconds to check PHP.net.)[/color]

No.
[color=blue]
> Next, are there any plans to remove the "$" in front of variables?[/color]

No.
[color=blue]
> Will there be real private members/ functions in PHP5 when using
> classes/ objects?[/color]

Yes.

Regards,
Matthias
Keith Bowes
Guest
 
Posts: n/a
#4: Jul 17 '05

re: PHP5 questions


Philipp Lenssen wrote:[color=blue]
> I was wondering when/ if PHP will include more object-oriented
> functions, like $myString.replace($find, $replaceWith). (I sometimes
> wonder if I need to use the first or second or third parameter or what
> and it takes some more seconds to check PHP.net.)
>[/color]

The developers have said that PHP will remain a procedural language.
However there's nothing preventing you from writing a String class.
Maybe it would be added to PEAR.

Closed Thread