PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.php > What is the php_operator.dll extension
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
What is the php_operator.dll extension

Réponse
 
LinkBack Outils de la discussion
Vieux 14/11/2007, 14h47   #1
DiamondEagle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut What is the php_operator.dll extension

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.

  Réponse avec citation
Vieux 14/11/2007, 17h43   #2
Michael Fesser
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: What is the php_operator.dll extension

..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
  Réponse avec citation
Vieux 16/11/2007, 11h54   #3
DiamondEagle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: What is the php_operator.dll extension

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.
  Réponse avec citation
Vieux 16/11/2007, 14h50   #4
Michael Fesser
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: What is the php_operator.dll extension

..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
  Réponse avec citation
Vieux 21/11/2007, 10h48   #5
DiamondEagle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: What is the php_operator.dll extension

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...
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 16h55.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10226 seconds with 13 queries