|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
I've successfully set up PHP 5.2.4 on my dev box and all is running
well. Originally I had the php_operator.dll extension loaded and it caused one of my applications (Moodle 1.8) to regularly throw "PHP has encountered an Access Violation at 022C7BF0" errors. As soon as I disabled the php_operator.dll extension everything started running smoothly. But now I'd like to know what PHP functionality I've disabled by disabling this php_operator.dll extension. Does anybody know what this php_operator.dll extension is? What does it do? I've tried using an older version of the PHP and a version from a more recent build of the 5.2.4 branch of PHP, but I still get the access violation errors. Thanks. |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
..oO(DiamondEagle)
>But now I'd like to know what PHP functionality I've disabled by >disabling this php_operator.dll extension. Does anybody know what this >php_operator.dll extension is? What does it do? It's probably the PECL extension of the same name. http://pecl.php.net/package/operator Micha |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Michael Fesser wrote:
> > It's probably the PECL extension of the same name. > > http://pecl.php.net/package/operator Aaah! Thanks! The summary for the Operator package on that page says that it's: "Operator overloading for Objects", but nothing more. What does that mean? Thanks. |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
..oO(DiamondEagle)
>Michael Fesser wrote: >> >> It's probably the PECL extension of the same name. >> >> http://pecl.php.net/package/operator > >Aaah! Thanks! > >The summary for the Operator package on that page says that it's: >"Operator overloading for Objects", but nothing more. What does that >mean? Overloading an operator means to define your own methods for it, so you can use all the predefined operators even with your own objects. Let's say for example we have a class for complex numbers. The simple mathematical operators +, -, ... won't work anymore, because complex numbers have their own rules. So in order to perform calculations with them, you have to define and use your own methods, e.g. $c1 = new Complex(5, 7); $c2 = new Complex(23, 42); $c1->add($c2); // $c1 becomes (28, 49) Now with operator overloading you could change the behaviour of the predefined operators, so that you can still use the nicer syntax, but internally they will automatically call your method instead: $c1 = $c1 + $c2; // will call $c1->add(), same result as above Micha |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
On Nov 16, 3:50 pm, Michael Fesser <neti...@gmx.de> wrote:
> > Overloading an operator means to define your own methods for it, so you > can use all the predefined operators even with your own objects. > <snip> Thanks. It makes sense now... |
|
![]() |
| Outils de la discussion | |
|
|