(Hallo|Hi(ho)|Tag und Mahlzeit) Tom,
Durch Versuch konnte ich feststellen, dass der alte Konstruktor nur aufgerufen wird, wenn kein neuer vorhanden ist. Ist das abgesichert? Darüber konnte ich nichts finden, insbesondere, wie es in Zukunft werden wird...
Es gab doch irgendwo eine Zusammenstellung der Änderungen von PHP4 zu PHP5, was die OOP betrifft.
Kann mir jemand den Link dazu geben?
Generell:
Änderungen von 4 zu 5.0.x: http://de.php.net/manual/en/migration5.php
Inkompatibilitäten zu 4: http://de.php.net/manual/en/migration5.incompatible.php
OO-spezifisch:
"Object model" in PHP5: http://de.php.net/manual/en/migration5.oop.php
Konstruktuoren und Desktruktoren in PHP5: http://de.php.net/manual/en/language.oop5.decon.php
Da steht (u. A.):
For backwards compatibility, if PHP 5 cannot find a __construct() function for a given class,
it will search for the old-style constructor function, by the name of the class.
Effectively, it means that the only case that would have compatibility issues is
if the class had a method named __construct() which was used for different semantics.
MffG
EisFuX