... The __construct name for constructors was added in PHP 5. 0. If you have anearlier version of PHP, the constructor will have the same name as the class, butis still a ... you want to make a parameteroptional in any PHP function, assign a default value to the parameter, as I havedone here. This is a sneaky way that PHP achieves polymorphism.Creating a Property ... setName() to enforce that rule.function setName($newName){if(strlen($newName) > 5) {$newName = substr($newName, 0, 5) ;} // end if$this->name = $newName;} // end setNameThis is a trivial...