I face a strange problem while I’m trying to document a project of mine. I have the following code:
//! Set default ::$action for called controller. If no action is called, default (index) will be set.
$action = isset($_GET[ 'action']) ? $_GET[ 'action'] : 'index';
if ($action) {
echo 'something 1';
}else{
echo 'something 2';
}
//! Set default ::$action2 for called controller. If no action is called, default (index) will be set.
$action2 = isset($_GET[ 'action']) ? $_GET[ 'action'] : 'index';
//! Set default ::$action3 for called controller. If no action is called, default (index) will be set.
$action3 = isset($_GET[ 'action']) ? $_GET[ 'action'] : 'index';
Doxygen generates the following:

As you may see, $action2 is missing. I check one of my other files and saw same problem. Next thing after if statement is never documented, but the one after that is documented. If I remove the if statement from above example, I get documentation for all 4 variables – $page, $action, action2 and action3.
I spend enormous time of trying to understand what exactly is wrong, but no luck, so every suggestion is welcomed.
System is:
Windows XP x64 with Doxygen 1.7.4. (I’m using the Doxygen GUI)
UPDATE
Also, when I have something like that in my code (notice the missing else for the if statement). When I add the }else{} however it works. Next $variables is not documented again, but that update was about the if/else.

Doxygen converts it to this
Check out this http://www.doxygen.nl/manual/autolink.html which explains the weirdness you’re seeing with the first code snippet.
Unfortunately Doxygen doesn’t do so well documenting procedural PHP code AND after checking all of my own doxygen generated documentation, I can’t find any documented variables for any function or method unless they are defined class properties.
Otherwise, I think the largest PHP Doxygen friendly project out there is Drupal, their guidelines were written to use Doxygen’s comment processing system to it’s fullest. http://drupal.org/node/1354
Note, if this is not the answer you’re looking for and or I’m completely off target, please let me know immediately so I can delete this answer.