Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHPDoc - how to mark constructor function in PHP

In JSDoc i can mark my constructor function with @constructor. Now i tried to find in the PHPDoc specs how to do the same for a PHP constructor but they never mention anything similar. What is the proper way to mark my constructor in PHP.

This:

/**
 * @constructor
 */
public function __construct()
{

}

Seems to be invalid.

like image 898
Wilt Avatar asked Oct 28 '25 23:10

Wilt


1 Answers

PHP documentation generators will recognize the __construct() method as the constructor. No special tag is required.

like image 167
ashnazg Avatar answered Oct 31 '25 14:10

ashnazg



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!