Page 1 of 1
Question about defining functions.
Posted: Fri Nov 02, 2007 11:15 pm
by dwnthk
Hi there,
In php.net, I saw some codes like this:
Code: Select all
function abc_123(...) { ... }
function _abc_123(...) { ... }
In the page, it is used like this:
I am not sure what does _abc_123() mean? Is it the overloading of the function abc_123()? When does the function _abc_123() will be called?
Thanks guys.
Dave
Posted: Fri Nov 02, 2007 11:20 pm
by Kieran Huggins
what was the URL of this page?
According to
http://php.net/functions:
PHP does not support function overloading, nor is it possible to undefine or redefine previously-declared functions.
But
class methods can be overloaded:
http://php.net/language.oop5.overloading
Posted: Fri Nov 02, 2007 11:30 pm
by dwnthk
Sorry about this.

Now I saw the _abc_123() has been called in the abc_123().
Most of the time, I will go to
http://www.php.net to find resources I needed.
I am trying to figure out how the regular expression is used in the preg_replace(). I got so confused on the pattern like "/\\&\\#([0-9]{3,10})\\;/e" blah blah blah, you know... Can anyone has me a short explanation?
Thanks.
Dave
Posted: Sat Nov 03, 2007 1:52 am
by Kieran Huggins
there's no "quick overview" of regular expressions, it's a very expressive language to say the least.
Check out
http://www.regular-expressions.info
If you have any specific questions, post in the regex forum.[/url]