Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Doxygen: How to document PHP constants?

How to document PHP constants:

define('SOME_CONSTANT', 'constant value');

with Doxygen?

like image 877
Shafiul Avatar asked Dec 05 '25 01:12

Shafiul


1 Answers

Just include a documentation block above the constant define() function call or const keyword like this:

<?php

/**
 * Short Break Adventure Trip Sub Type Id
 */ 
const TRIP_SBA = 1;

/** 
 * Small Group Adventure Trip Sub Type Id
 */ 
define('TRIP_SGA', 2);

?>
like image 190
Christopher Avatar answered Dec 06 '25 15:12

Christopher



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!