cvs: functable / table.php

From: Date: Tue, 28 May 2002 11:46:55 +0000
Subject: cvs: functable / table.php
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-12148@lists.php.net to get a copy of this message
hholzgra Tue May 28 07:46:55 2002 EDT Modified files: /functable table.php Log: starting to modularize things

Index: functable/table.php diff -u functable/table.php:1.8 functable/table.php:1.9 --- functable/table.php:1.8 Mon Nov 26 13:31:18 2001 +++ functable/table.php Tue May 28 07:46:54 2002 @@ -38,6 +38,7 @@ set_time_limit(0); +error_reporting(E_ALL - E_NOTICE); ob_implicit_flush(); $db = mysql_connect($db_server,$db_user,$db_passwd); @@ -61,7 +62,7 @@ if(!isset($parts["port"])) $parts["port"]=80; - $fp = fsockopen ($parts["host"], $parts["port"], &$errno, &$errstr, 30); + $fp = fsockopen ($parts["host"], $parts["port"], $errno, $errstr, 30); if($fp) { fputs ($fp, "HEAD $parts[path] HTTP/1.0\r\n\r\n"); $line = fgets ($fp,128); @@ -136,7 +137,7 @@ $showname=$filename; } $showname=ereg_replace("#.*","",$showname); - list($filename,$lineno)=split("#",$filename); + list($filename,$lineno)=explode("#",$filename); switch($fbase) { case "php3": return "<a href=\"http://bonsai.php.net/cvsblame.cgi?file=$filename&rev=&root=/local/repository#$lineno\">$showname</a>"; @@ -214,6 +215,10 @@ return " $docstr\n"; } +function author_ref($author) { + return $author; +} + # }}} # {{{ functions for page setup @@ -255,10 +260,7 @@ <a href="statistics.<?= $ext ?>">statistics</a> </p> <?php - if(!empty($ttitle)) - { - print("<h2>$ttitle</h2><p>&nbsp;</p>\n"); - } + if(!empty($ttitle)) echo "<h2>$ttitle</h2><p>&nbsp;</p>\n"; } @@ -330,7 +332,10 @@ } } - print("<th>doc</th><th colspan=\"".(count($translation)-1)."\">translations</th></tr>\n"); + print("<th>doc</th>"); + print("<th colspan=\"".(count($translation)-1)."\">translations</th>"); + print("<th>introduced into PHP 4 by</th>"); + print("</tr>\n"); } } @@ -359,7 +364,13 @@ # {{{ collecting data from DB echo "getting version ids\n"; -$result = mysql_query("select distinct versionid,version from funclist order by versionid"); +$query="SELECT DISTINCT + versionid + , version + FROM funclist + ORDER BY versionid + "; +$result = mysql_query($query); if(!$result) { echo mysql_error(); } while($row=mysql_fetch_array($result)) { $version[$row["versionid"]] = $row["version"]; @@ -392,7 +403,6 @@ while($row=mysql_fetch_array($result)) { $function = strtolower(trim($row["function"])); $filename = str_replace("php_4_cvs","php4",$row["filename"]); - $path = split("/",$filename); $file4[$function]="$filename#$row[lineno]"; } mysql_free_result($result); @@ -440,6 +450,15 @@ } mysql_free_result($result); +echo "getting function authors\n"; +$result = mysql_query("select function,author from author"); +if(!$result) { echo mysql_error(); exit; } +while($row=mysql_fetch_array($result)) +{ + $author[$row['function']] = $row['author']; +} +mysql_free_result($result); + echo "checking for translations\n"; reset($translation); while(list($language,)=each($translation)) { @@ -495,862 +514,31 @@ -# {{{ alphabetic reference 3 - -$letter = ""; -reset($entry); -while(list($function,$versions)=each($entry)) { - $minid=9999; - reset($version); - - while(list($versionid,$versiontag)=each($version)) { - if(isset($versions[$versiontag])) { - if($versionid<$minid) - $minid=$versionid; - } - } - if($minid>=400) continue; - - if($function[0]!=$letter) { - if(!empty($letter)) { - print("</table>\n"); - foot("$outdir/$letter.3.$ext"); - - } - $letter = $function[0]; - head($version3,$letter,"Alplabetical List","Alphabetical -".strtoupper($letter)."- (PHP 3)",3); - } - bg_toggle(); - print("<tr bgcolor=\"$bgcolor\">"); - if(isset($alias[$function])) { - print("<td><i>".fpage($function)."</i></td>"); - } else { - print("<td>".fpage($function)."</td>"); - } - - reset($version); - while(list($versionid,$versiontag)=each($version)) { - if($versionid>399) continue; - if(isset($versions[$versiontag])) { - print("<td>$ok_mark</td>"); - }else{ - print("<td>&nbsp;</td>"); - } - if($versionid%100==99) { // *99->latest cvs versions - if(isset($proto3[$function])) { - print("<td align=\"center\">$ok_mark</td>"); - } else { - print("<td>&nbsp;</td>"); - } - } - } - - - $docname=str_replace("_","-",$function); - - if(isset($docfile[$function])) { - print("<td align=center>".docref($function,"yes")."</td>"); - } else { - print("<td>&nbsp;</td>"); - } - - reset($translation); - while(list($language,)=each($translation)) { - if($language=='en') continue; - if(isset($doc[$language][$function])) { - print("<td align=center>".docref($function,$language)."</td>"); - } else { - print("<td>&nbsp;</td>"); - } - } - - print("</tr>\n"); -} -print("</table>\n"); -foot("$outdir/$letter.3.$ext"); - -// dirty hack: php 3 had no functions beginning with 'z' -head($version3,"z","Alplabetical List","Alphabetical -".strtoupper($letter)."- (PHP 3)",3); -foot("$outdir/z.3.$ext"); - -# }}} - -# {{{ alphabetic reference 4 - -$letter = " "; - -reset($entry); -while(list($function,$versions)=each($entry)) { - $maxid=0; - reset($version); - while(list($versionid,$versiontag)=each($version)) { - if(isset($versions[$versiontag])) { - if($versionid>$maxid) - $maxid=$versionid; - } - } - if($maxid<400) continue; - - if($function[0]!=$letter) { - if($letter!=" ") { - print("</table>\n"); - foot("$outdir/$letter.$ext"); - } - $letter = $function[0]; - head($version4,$letter,"Alplabetical List","Alphabetical -".strtoupper($letter)."-"); - } - bg_toggle(); - print("<tr bgcolor=\"$bgcolor\">"); - if(isset($alias[$function])) { - print("<td><font color=\"green\"><i>".fpage($function)."</i></font></td>"); - } else { - print("<td>".fpage($function)."</td>"); - } - reset($version); - while(list($versionid,$versiontag)=each($version)) { - if($versionid<400) continue; - if(isset($versions[$versiontag])) { - print("<td>$ok_mark</td>"); - }else{ - print("<td>&nbsp;</td>"); - } - if($versionid%100==99) { // *99->latest cvs versions - if(isset($proto4[$function])) { - print("<td align=\"center\">$ok_mark</td>"); - } else { - print("<td>&nbsp;</td>"); - } - } - } - - - $docname=str_replace("_","-",$function); - - if(isset($docfile[$function])) { - print("<td align=center>".docref($function,"yes")."</td>"); - } else { - print("<td>&nbsp;</td>"); - } - - reset($translation); - while(list($language,)=each($translation)) { - if($language=='en') continue; - if(isset($doc[$language][$function])) { - print("<td align=center>".docref($function,$language)."</td>"); - } else { - print("<td>&nbsp;</td>"); - } - } - - - print("</tr>\n"); -} -print("</table>\n"); -foot("$outdir/$letter.$ext"); - - -# }}} - -# {{{ extension extension overview - -head(false,false,"Extensions","Extension Reference"); -print("<table><tr bgcolor=\"$bgcolor\">"); - -print("<th>default</th><th>source directory</th></tr>\n"); -bg_toggle(); -print("<tr bgcolor=\"$bgcolor\"><td><a href=\"extension.Zend.$ext\">Zend</a></td><td>$extensions[Zend]</td></tr>"); -bg_toggle(); -print("<tr bgcolor=\"$bgcolor\"><td><a href=\"extension.standard.$ext\">PHP 4</a></td><td>$extensions[standard]</td></tr>"); -print("<th>extension</th><th>source directory</th></tr>\n"); -reset($extensions); -while(list($extension,$dirname)=each($extensions)) { - bg_toggle(); - if(($extension<>"standard")&&($extension<>"Zend")) - print("<tr bgcolor=\"$bgcolor\"><td><a href=\"extension.$extension.$ext\">$extension</a></td><td>$dirname</td></tr>"); -} -print("</table>\n"); -foot("$outdir/extensions.$ext"); - -# }}} - - -# {{{ extension extensions reference 4 - -$query = "select distinct function,substring_index(substring_index(filename,'/',-2),'/',1) as extension from funclist where versionid=499 order by extension,function"; -$result = mysql_query($query); - -reset($extensions); -$extension = " "; -while($row=mysql_fetch_array($result)) { - $function=$row["function"]; - if($row["extension"]!=$extension) { - if($extension!=" ") { - print("</table>\n"); - foot("$outdir/extension.$extension.$ext"); - } - $extension=$row["extension"]; - head($version4,false,"Extension","$extension extension (<i>$extensions[$extension]</i>)"); - } - $versions = $entry[strtolower(trim($function))]; - bg_toggle(); - print("<tr bgcolor=\"$bgcolor\">"); - if(@isset($alias[$function])) { - print("<td><font color=\"green\"><i>".fpage($function)."</i></font></td>"); - } else { - print("<td>".fpage($function)."</td>"); - } - reset($version); - while(list($versionid,$versiontag)=each($version)) {//abc - if($versionid>=400) { - if(isset($versions[$versiontag])) { - print("<td>$ok_mark</td>"); - }else{ - if($versionid>=400) { - print("<td>$fail_mark</td>"); - } else { - print("<td>&nbsp;</td>"); - } - } - if($versionid%100==99) { // *99->latest cvs versions - if(($versionid<400)?isset($proto3[$function]):isset($proto4[$function])) { - print("<td align=\"center\">$ok_mark</td>"); - } else { - print("<td>&nbsp;</td>"); - } - } - } - } - - - $docname=str_replace("_","-",$function); - - if(isset($docfile[$function])) { - print("<td align=center>".docref($function,"yes")."</td>"); - } else { - print("<td>&nbsp;</td>"); - } - - reset($translation); - while(list($language,)=each($translation)) { - if($language=='en') continue; - if(isset($doc[$language][$function])) { - print("<td align=center>".docref($function,$language)."</td>"); - } else { - print("<td>&nbsp;</td>"); - } - } - - print("</tr>\n"); -} - -mysql_free_result($result); -print("</table>\n"); -foot("$outdir/extension.$extension.$ext"); - - -# }}} - -# {{{ function detail pages - -reset($entry); -while(list($function,$versions)=each($entry)) { - $what = (isset($alias[$function])?"alias":"function"); - if(isset($file4[$function])) { - $module = explode("/",$file4[$function]); - $module = $module[count($module)-2]; - head(false,false,"Function Details","$what $function (<a href=\"extension.$module.$ext\">$module</a>)"); - } else { - head(false,false,"Function Details","$what $function"); - } - - - print( "<table width=\"100%\">"); // linke spalte - -# {{{ documentation block - $docname=str_replace("_","-",$function); - - print( "<tr valign=\"top\"><td>"); // linke spalte - - printf( "<table>\n"); - - print("<tr bgcolor=\"$color2\"><td><b>Description</b></td><td>"); - if(isset($quickref['en'][$function])) { - print($quickref['en'][$function]."\n"); - } else { - print("none"); - } - - print("<tr bgcolor=\"$color2\"><td><b>Documentation</b></td><td>"); - if(isset($docfile[$function])) { - print(docref($function)); - if(!isset($alias[$function])) $translation["en"]++; - } else { - print("none"); - } - print("</td></tr>\n"); - print("<tr bgcolor=\"$color2\"><td><b>XML source</b></td><td>"); - if(isset($docfile[$function])) { - list($filename,$lineno)=split("#",$docfile[$function]); - print("<a href=\"http://bonsai.php.net/cvsblame.cgi?file=phpdoc/en/functions/".$filename."&rev=&root=/local/repository#$lineno\">phpdoc/en/function".$filename."</a>"); - } else { - print("none"); - } - print("</td></tr>\n"); +include "lib/alphabetic_3.php"; +include "lib/alphabetic_4.php"; +include "lib/extension_overview.php"; +include "lib/extensions_4.php"; - print("<tr bgcolor=\"$color2\"><td><b>Translations</b></td><td>"); - reset($translation); - while(list($language,)=each($translation)) { - if($language=='en') continue; - if(isset($doc[$language][strtolower(trim($function))])) - print(" ".docref($function,$language)); - } - print("</td></tr>\n"); - printf("</table>\n"); +include "lib/function_details.php"; - print( "\n</td><td>\n"); // rechte spalte - if(isset($proto4[$function])) { - print("there is a proto in latest PHP 4 source:<br><table><tr bgcolor=\"$color2\"><td>".$proto4[$function]."</td></tr></table><p>\n"); - } - else if(isset($proto3[$function])) { - print("there is a proto in latest PHP 3 source:<br><table><tr bgcolor=\"$color2\"><td>".$proto3[$function]."</td></tr></table><p>\n"); - } else { - print("this function lacks a proto definition\n"); - } - print( "\n</td></tr>\n"); +include "lib/statistics/undocumented_functions.php"; +include "lib/statistics/undocumented_aliases.php"; +include "lib/statistics/no_prototype.php"; +#include "lib/statistics/not_published.php"; +include "lib/statistics/in_php_3_only.php"; +include "lib/statistics/in_php_4_only.php"; +include "lib/statistics/aliases.php"; +include "lib/statistics/busy_coders.php"; -# }}} - print( "\n<tr><td colspan=3>&nbsp;</td></tr>\n"); +include "lib/statistics/statistics.php"; -# {{{ php 4 block - print( "<tr valign=top><td>"); // linke spalte - printf("<table>"); - if(isset($alias[$function])) { - print("<tr bgcolor=\"$color2\"><td><b>this is an alias for function</b></td><td>"); - print(fpage($alias[$function])); - print("</td></tr>\n"); - } - - print("<tr bgcolor=\"$color2\"><td><b>PHP 4 source definition</b></td><td>"); - if(isset($file4[$function])) { - print(sourceref($file4[$function])); - } else { - printf("none"); - } - print("</td></tr>\n"); - print("<tr bgcolor=\"$color2\"><td><b>PHP 4 source implementation</b></td><td>"); - if(isset($imp4[$function])) { - print(sourceref($imp4[$function])); - } else { - printf("none"); - } - print("</td></tr>\n"); - print("</table>\n"); - print( "\n</td><td>\n"); // rechte spalte - - print("<table>\n"); - - print("<tr bgcolor=\"$color2\"><td colspan=18>PHP 4.*.*</td></tr>\n"); - print("<tr valign=bottom bgcolor=\"$color2\">"); - reset($version); - while(list($versionid,$tag)=each($version)) { - $ver = ereg_replace("<br>$","",ereg_replace("(.)","\\1<br>",str_replace("_",".",substr(strstr($tag,"_"),1)))); - if($versionid>=400) { - print("<th>$ver</th>"); - } - } - print( "</tr>"); - - print("<tr>"); - reset($version); - while(list($versionid,$versiontag)=each($version)) { - if($versionid>=400) { - if(isset($versions[$versiontag])) { - print("<td>$ok_mark</td>"); - }else{ - print("<td>$fail_mark</td>"); - } - } - } - print( "</tr></table>\n"); - - print("</td></tr>\n"); -# }}} - print( "\n<tr><td colspan=3>&nbsp;</td></tr>\n"); - -# {{{ php 3 block - - print( "<tr valign=top><td>"); // linke spalte - - printf("<table><tr bgcolor=\"$color2\"><td>"); - print( "<b>PHP 3 source definition</b>"); - print( "</td><td>"); - if(isset($file3[$function])) { - print(sourceref($file3[$function])); - } else { - print("none in current CVS</td>"); - } - printf("</tr></td></table>\n"); - - - print( "\n</td><td>\n"); // rechte spalte - - print("<table>\n"); - print("<tr bgcolor=\"$color2\"><td colspan=18>PHP 3.0.*</td></tr>\n"); - print("<tr valign=bottom bgcolor=\"$color2\">"); - reset($version); - while(list($versionid,$tag)=each($version)) { - $ver = ereg_replace("<br>$","",ereg_replace("(.)","\\1<br>",substr(strrchr($tag,"_"),1))); - if($versionid<400) { - print("<th>$ver</th>"); - } - } - print( "</tr>\n"); - - print("<tr>"); - reset($version); - while(list($versionid,$versiontag)=each($version)) { - if($versionid<400) { - if(isset($versions[$versiontag])) { - print("<td>$ok_mark</td>"); - }else{ - print("<td>&nbsp;</td>"); - } - } - } - print( "</tr>"); - - - print( "</table>\n"); - - print( "</td></tr>"); - -# }}} - - print("</table>\n"); - - foot("$outdir/function.$function.$ext"); -} - -# }}} - - -# {{{ functions without prototype - -head(false,false,"Statistics","Functions without Prototype"); -print( "<table><tr bgcolor=\"$bgcolor\"><th>function</th><th>file</th><th>PHP 3 proto</th></tr>\n"); - -$result=mysql_query(" -select distinct funclist.function as fname, funclist.filename as file, funclist.lineno as lineno - from funclist left join proto4 on funclist.function = proto4.function - where proto4.function is null - and alias_for is null - and versionid=499 - order by funclist.filename,funclist.function -"); - -$count['noproto']=mysql_num_rows($result); - -while($row=mysql_fetch_array($result)) -{ - bg_toggle(); - print("<tr bgcolor=\"$bgcolor\"><td>".fpage($row["fname"])."</td><td>".sourceref($row["file"]."#".$row["lineno"])."</td><td>"); - if(isset($proto3[trim($row["fname"])])) - print($proto3[trim($row["fname"])]); - print("&nbsp;</td></tr>\n"); -} -mysql_free_result($result); - -print("</table>\n"); -foot("$outdir/noproto.$ext"); - - -# }}} - -# {{{ functions without documentation - -head(false,false,"Statistics","Functions not (yet) Documented"); -print( "<table><tr bgcolor=\"$bgcolor\"><th>function</th><th>file</th></tr>\n"); -$result=mysql_query("select distinct funclist.function as fname,funclist.filename as file, funclist.lineno as lineno - from funclist left join docfile on funclist.function = docfile.function - where docfile.function is null and funclist.versionid=499 and funclist.alias_for is null - order by funclist.filename,funclist.function - "); -$count['nodoku']=mysql_num_rows($result); -while($row=mysql_fetch_array($result)) -{ - bg_toggle(); - print("<tr bgcolor=\"$bgcolor\"><td>".fpage($row["fname"])."</td><td>".sourceref($row["file"]."#".$row["lineno"])."</td></tr>\n"); -} -mysql_free_result($result); -print( "</table>\n"); -foot("$outdir/nodoku.$ext","w"); - - -# }}} - -# {{{ aliases without documentation - -head(false,false,"Statistics","Aliases not (yet) documented"); -print( "<table><tr bgcolor=\"$bgcolor\"><th>alias</th><th>file</th><th>orig. function</th></tr>\n"); -$result=mysql_query("select distinct funclist.function as fname,funclist.filename as file, funclist.alias_for as aname, funclist.lineno as lineno - from funclist left join docfile on funclist.function = docfile.function - where docfile.function is null and funclist.versionid=499 and funclist.alias_for is not null - order by funclist.filename,funclist.function - "); -$count['nodoku_alias']=mysql_num_rows($result); -while($row=mysql_fetch_array($result)) -{ - bg_toggle(); - print("<tr bgcolor=\"$bgcolor\"><td>".fpage($row["fname"])."</td><td>".sourceref($row["file"]."#".$row["lineno"])."</td><td>".fpage($row["aname"])."</td></tr>\n"); -} -mysql_free_result($result); -print( "</table>\n"); -foot("$outdir/nodoku_alias.$ext"); - - -# }}} - - -# {{{ functions declared in latest php 4 but not published to user space - -head(false,false,"Statistics","Functions implemented but not made available"); -print( "<table><tr bgcolor=\"$bgcolor\"><th>function</th><th>file</th></tr>\n"); -$result=mysql_query("select i.function as function, i.file as file , i.lineno as lineno" - ." from funcimp i left outer join funclist f on f.function=i.function and f.versionid = i.versionid " - ." where i.versionid = 499 and f.versionid is null" - ." order by file,function"); -$count['notpub']=mysql_num_rows($result); -while($row=mysql_fetch_array($result)) { - bg_toggle(); - $filename = str_replace("php_4_cvs","php4",$row["file"]); - print("<tr bgcolor=\"$bgcolor\"><td>".fpage($row["function"])."</td><td>".sourceref($filename."#".$row["lineno"])."</td></tr>\n"); -} -mysql_free_result($result); -print( "</table>\n"); -foot("$outdir/notpub.$ext"); - - -# }}} - -# {{{ functions in php 3 but not php 4 - -include "deprecate.php"; - -head(false,false,"Statistics","Functions available in PHP 3 that are not (yet) available in PHP 4"); -print( "<table><tr bgcolor=\"$bgcolor\"><th>function</th><th>file</th><th>reason</th></tr>\n"); -$result=mysql_query("select f1.function as fname,f1.filename as file, f1.lineno as lineno " - ."from funclist f1 left join funclist f2 " - ."on (f1.function=f2.function and f2.versionid=499) " - ."where f1.versionid=399 and f2.function is null order by f1.filename,f1.function"); -$count['notin4']=mysql_num_rows($result); -$count['notin4withreason']=0; -while($row=mysql_fetch_array($result)) { - bg_toggle(); - print("<tr bgcolor=\"$bgcolor\">"); - print("<td>".fpage($row["fname"])."</td>"); - print("<td>".sourceref($row["file"]."#".$row["lineno"])."</td>"); - print("<td>"); - if(isset($deprecate[$row["fname"]])) { - echo $deprecate[$row["fname"]]; - $count['notin4withreason']++; - } else { - echo "&nbsp;"; - } - print("</td></tr>\n"); -} -mysql_free_result($result); -print( "</table>\n"); -foot("$outdir/notin4.$ext"); - - -# }}} - -# {{{ functions in php 4 but not php 3 - -head(false,false,"Statistics","Functions new to php 4 that where not available in php 3"); -print( "<table><tr bgcolor=\"$bgcolor\"><th>function</th><th>file</th></tr>\n"); -$result=mysql_query("select f1.function as fname,f1.filename as file, f1.lineno as lineno " - ."from funclist f1 left join funclist f2 " - ."on (f1.function=f2.function and f2.versionid=399) " - ."where f1.versionid=499 and f2.function is null " - ."order by f1.function"); -$count['notin3']=mysql_num_rows($result); -while($row=mysql_fetch_array($result)) { - bg_toggle(); - print("<tr bgcolor=\"$bgcolor\"><td>".fpage($row["fname"])."</td><td>".sourceref($row["file"]."#".$row["lineno"])."</td></tr>\n"); -} -mysql_free_result($result); -print( "</table>\n"); -foot("$outdir/notin3.$ext"); - - -# }}} - -# {{{ total aliases - -head(false,false,"Statistics","Aliases"); -print( "<table><tr bgcolor=\"$bgcolor\"><th>alias</th><th>file</th><th>orig. function</th></tr>\n"); -$result=mysql_query("select distinct funclist.function as fname - , funclist.filename as file - , funclist.alias_for as aname - , funclist.lineno as lineno - from funclist - where funclist.versionid=499 and funclist.alias_for is not null - order by funclist.filename, funclist.function - "); -$count['all_aliases']=mysql_num_rows($result); -while($row=mysql_fetch_array($result)) -{ - bg_toggle(); - print("<tr bgcolor=\"$bgcolor\"><td>".fpage($row["fname"])."</td><td>".sourceref($row["file"]."#".$row["lineno"])."</td><td>".fpage($row["aname"])."</td></tr>\n"); -} -mysql_free_result($result); -print( "</table>\n"); -foot("$outdir/all_aliases.$ext"); - - -# }}} - - -# {{{ statistics page - -function statentry($part,$all=0) -{ - if(!$part) return "<tt>&nbsp;</tt>"; - - if(!$all) - $percent= "<small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</small>"; - else - $percent= str_replace(" ","&nbsp;",sprintf("<small>(%3d%%)</small>",$part*100.0/$all)); - - return "<tt>&nbsp;$part $percent</tt>"; -} - -head(false,false,"Statistics","Statistics"); - - -$result=mysql_query("select distinct function from funclist where versionid=499"); -$count['php4']=mysql_num_rows($result); -mysql_free_result($result); - -$result=mysql_query("select distinct function from funclist where versionid=499 or versionid=399"); -$count['all']=mysql_num_rows($result); -mysql_free_result($result); - -print( "<p>&nbsp;</p><table><tr bgcolor=\"$bgcolor\"><th>&nbsp;</th><th>functions</th><th>aliases</th><th>total</th></tr>\n"); -bg_toggle(); -print( "<tr align=right bgcolor=\"$bgcolor\">" - ."<td>total</td>" - ."<td>".statentry($count['all']-count($alias))."</td>" - ."<td>".statentry(count($alias))."</td>" - ."<td>".statentry($count['all'])."</td></tr>\n"); -bg_toggle(); -print( "<tr align=right bgcolor=\"$bgcolor\">" - ."<td>php4</td>" - ."<td>".statentry($count['php4']-count($alias))."</td>" - ."<td>".statentry(count($alias))."</td>" - ."<td>".statentry($count['php4'])."</td></tr>\n"); -bg_toggle(); -print( "<tr align=right bgcolor=\"$bgcolor\">" - ."<td>with proto</td>" - ."<td>".statentry(count($proto4),$count['php4'])."</td>" - ."<td><tt> -</tt></td>" - ."<td>".statentry(count($proto4))."</td></tr>\n"); -bg_toggle(); -print( "<tr align=right bgcolor=\"$bgcolor\">" - ."<td>documented</td>" - ."<td>".statentry($translation["en"],$count['php4'])."</td>" - ."<td>".statentry(count($docfile)-$translation["en"],count($alias))."</td>" - ."<td>".statentry(count($docfile))."</td></tr>\n"); - -reset($translation); -while(list($language,)=each($translation)) { - bg_toggle(); - if($language=='en') continue; - print( "<tr align=right bgcolor=\"$bgcolor\">" - ."<td>$language translations</td>" - ."<td><tt> -</tt></td>" - ."<td><tt> -</tt></td>" - ."<td>".statentry($translation[$language],$count['php4']+count($alias))."</td></tr>\n"); -} -print( "</table>\n"); - -print( "<p><ul>\n"); -print( "<li><a href=\"noproto.$ext\">$count[noproto] functions without prototype (PHP 4)</a><p>\n"); -print( "<li><a href=\"nodoku.$ext\">$count[nodoku] functions without documentation (PHP 4)</a><p>\n"); -print( "<li><a href=\"nodoku_alias.$ext\">$count[nodoku_alias] aliases without documentation (PHP 4)</a><p>\n"); -print( "<li><a href=\"notin4.$ext\">$count[notin4] function in PHP 3 but not in PHP 4 ($count[notin4withreason] with a reason)</a><p>\n"); -print( "<li><a href=\"notin3.$ext\">$count[notin3] function in PHP 4 but not in PHP 3</a><p>\n"); -print( "<li><a href=\"notpub.$ext\">$count[notpub] functions implemented in PHP 4 but not made available</a><p>\n"); - -print( "</ul>\n"); - -foot("$outdir/statistics.$ext"); - -# }}} - - -# {{{ about - -echo "about\n"; -head(false,false,"","About this Functiontable"); -?> -<hr> - This is a reference table that shows for each function (and alias) - <ul> - <li>in which version it is available</li> - <li>where its definition currently lives in the source</li> - <li>if it is documented</li> - <li>translation status for the supported documentation languages</li> - </ul> - - <p> - The Information is gathered into a mysql database - from checkouts of all tagged CVS release versions from the past - plus the latest CVS version - by modified versions of the funclist and quickref tools from phpdoc. - </p> - - <p> - I created this overview after finding more than one function that - had been introduced into PHP 3 and documented after the code split - but not brought into the PHP 4 repository yet. - </p> - - <p> - The pages are available as a tarball (<a href=php-reftab.tar.gz>php-reftab.tar.gz</a>) - for offline reading (~430KB packed, ~13MB(!) unpacked). - </p> - - Note: - <ul> - <li> - Translation status is checked by comparing the &lt;refpurpose&gt; - entries against the english version. This may lead to - wrong results if the english version changed without - the not-yet-translated file being updated. - <br> - Take this field as a hint only! - </li> - <li> - Alias information is taken from php 4 source only, in php 3 source - there is no difference between function and alias entries in the - function tables. - </li> - </ul> - - ToDo: - <ul> - <li> - create a style with - reduced markup for faster table rendering - </li> - <li> - statistics need further improvements, - for example protection against multiple - entries - </li> - <li> - protection against broken links when - documentation sites are not up-to-date - with latest phpdoc cvs (prepared but didn't work) - </li> - <li> - implementation links for php 3 - </li> - <li> - switch to some sort of XML output - </li> - </ul> - - - What's new: - <ul> - <li> 23.11.2000 - <ul> - <li> will no longer report object member functions as aliases - </ul> - <p> - <li> 11.10.2000 - <ul> - <li> the source to generate theese pages is now available - on <a href="http://cvs.php.net">cvs.php.net</a> - as module <a href="http://cvs.php.net/viewcvs.cgi/functable/">functable</a> - <li> i slightly reformated the function detail page and added line number - information to the XML source links - </ul> - <p> - <li> 22.8.2000 - <ul> - <li> improved output for HTML compatibility - <li> language identifiers may now have more than two characters - <p></ul> - <p> - <li> 14.8.2000 - <ul> - <li> statistics imporovements - <li> seperate tables for php 3 and 4 - <li> auto-detects new languages - <li> internal generation speedups and styleability - </ul> - <p> - <li> 13.6.2000 - <ul> - <li> no more dead links? - <li> links to german manual pages updated - <li> links to xml documentation source files added in function details - </ul> - <p> - <li> 6.6.2000 - <ul> - <li> <a href="notpub.<?php echo $ext ?>">function implemented in PHP 4 but not made available</a> - </ul> - <p> - <li> 22.5.2000 - <ul> - <li> updated to include php 4.0.0 release - <li> see also: <a href="http://www.zugeschaut-und-mitgebaut.de/php/a2ps">a2ps stylesheet for pretty-printed php code</a> - </ul> - <p> - <li> 19.5.2000 (#2) - <ul> - <li> functions grouped by extension extension - <li> minor markup changes for better print output - </ul> - <p> - <li> 19.5.2000 - <ul> - <li> prototype-column for php 3 - <li> filename columns removed from the table - <li> reference links to bonsai.php.net include line numbers - <li> for php 4 there are now links to function table entry _and_ implementation - </ul> - <p> - <li> 17.5.2000 - <ul> - <li> prototype-column (latest php 4 only) - <li> what's missing pages under statistics - <ul> - <li> <a href="noproto.<?php echo $ext ?>">functions without a prototype</a> in the PHP 4 source (PHP 3 proto is shown if available) - <li> <a href="nodoku.<?php echo $ext ?>">undocumented functions</a> overview - <li> <a href="nodoku_alias.<?php echo $ext ?>">undocumented aliases</a> overview - <li> functions available <a href="notin4.<?php echo $ext ?>">in PHP 3 but not in PHP 4</a> - </ul> - </ul> - </ul> - - <hr> -<? -foot("$outdir/about.$ext"); - -# }}} echo "index\n"; if(function_exists("custom_index")) { @@ -1390,6 +578,8 @@ + +include "lib/about.php";
« previous php.cvs (#12148) next »