Constructor (object-oriented programming): Difference between revisions

Content deleted Content added
m rvv
Line 481:
}
</syntaxhighlight>
 
Note that in PHP a class is only allowed to declare a maximum of one constructor method. Static methods, factory classes or optional constructor arguments are some methods to allow multiple ways to create objects of a PHP class.
 
=== Perl 5 ===