function overloading
| From: | Robert Stoll | Date: | Wed, 03 Dec 2014 21:40:43 +0000 |
| Subject: | function overloading | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-79402@lists.php.net to get a copy of this message | ||
Heya,
I would like to know If it is somehow possible to overload existing functions by extensions. And if
it is possible, are
there already some extension doing it?
I am not talking about the magic __call function. I am talking about something like: let's
assume GMP has overloaded the
function "abs" and therefore one can write:
$n = gmp_init(-12345678901234567890);
abs($n+ 2); // instead of using gmp_abs
I know that GMP has overloaded operators so it doesn't seem so far that overloading functions
is possible as well.
I hope someone can help me.
Cheers,
Robert