__construct() vs sameasclassname() constructor php
is there any advantage controlling __construct() instead class's name constructor php?
example (__construct):
class foo {
duty __construct(){
//do stuff
}
}
example (named):
class foo {
duty foo(){
//do stuff
}
}
having __construct slight (first example) illusory given php 5.
having slight same name category constructor (second example) illusory php chronicle 4 until chronicle 7.
Comments
Post a Comment