cvs: functable /lib/statistics statistics.php

From: Date: Tue, 28 May 2002 11:43:04 +0000
Subject: cvs: functable /lib/statistics statistics.php
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-12145@lists.php.net to get a copy of this message
hholzgra Tue May 28 07:43:04 2002 EDT Added files: /functable/lib/statistics statistics.php Log: initial checkin Index: functable/lib/statistics/statistics.php +++ functable/lib/statistics/statistics.php <?php 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( "<table><tr><td><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) ($count[nodoku_reason] with a reason)</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></td>\n<td><ul>"); print( "<li><a href='busy_coders.$ext'>Who writes the functions</a><p>\n"); print( "</ul></td></tr></table>\n"); foot("$outdir/statistics.$ext"); ?>

« previous php.cvs (#12145) next »