This article is proposed by Dustin Schneider
In response to Stefano Locati's "How To quote your php category", I created a fast and simple php processing thread that will conform to the syntax of other php3 files and create some basic files.
This advantage is that it can be replaced by any annotation-Plus it Is Very extensible.
Currently, the processing thread recognizes the following commands:
= Header (title)
% = Description)
!! = Horizontal Line (Horizontal Line)
; = End of decleration. (End Declaration)
For example:
/* @ This_function ($ var1, $ var2 );
% This function takes 2 variables and does absolutely nothing with them .;
!! */
Something like this will be generated:
This_function ($ var1, $ var2)
Note: This function has variables $ var1 and $ var2. This function has two variables and has no effect on them (here it is a horizontal line)
$ Filename = "FILENAME_HERE ";
$ Fp = fopen ($ filename, "r ");
$ Buffer = fread ($ fp, filesize ($ filename ));
Fclose ($ fp );
For ($ I = 0; $ I {
// Header
If ($ buffer [$ I] ==& $ buffer [$ I + 1] == @)
{
Echo "";
$ I ++;
While ($ buffer [$ I ++]! = ;)
{
If ($ buffer [$ I] = ;)
Break;
Echo $ buffer [$ I];
}
Echo "";
}
// Description
If ($ buffer [$ I] ==%&$ buffer [$ I + 1] ==%)
{
Echo "Description :";
$ I ++;
While ($ buffer [$ I ++]! = ;)
{
If ($ buffer [$ I] = ;)
Break;
Echo $ buffer [$ I];
}
Echo "";
}
If ($ buffer [$ I] =! & $ Buffer [$ I + 1] = !)
{
Echo"";
}
}