What's the difference between __construct() and init() What's the difference between __construct() and init() php php

What's the difference between __construct() and init()


init() is called by the constructor.

init() isn't defined in the specification of PHP, it's only a method available with the Zend Framework to help initialize without having to rewrite the constructor yourself.


On the same topic :


__construct is a php magic method. It always exists and is called on object creation. init() is just a reguar method usually used in ZF..