超越PHP PHP动态 | 经典文章 | CLASS | 相关下载 | 常见问题 | FORUM | WIKI | 在线手册
Site search:    
<PHP 的命令行模式Apache>
Last updated: Fri, 22 Jun 2007

VI. 函数参考

目录
I. Apache 函数库
II. 数组函数库
III. Aspell 函数库 [已废弃]
IV. BCMath 任意精度数学函数库
V. Bzip2 压缩函数库
VI. 日历函数库
VII. CCVS API Functions [deprecated]
VIII. Windows 的 COM 支持函数库
IX. Classkit Functions
X. 类/对象函数库
XI. ClibPDF Functions
XII. Crack Functions
XIII. CURL, Client URL Library Functions
XIV. Cybercash Payment Functions
XV. Cyrus IMAP administration Functions
XVI. Character Type Functions
XVII. Database (dbm-style) Abstraction Layer Functions
XVIII. 时间日期函数库
XIX. dBase Functions
XX. DBM Functions [deprecated]
XXI. dbx Functions
XXII. DB++ Functions
XXIII. Direct IO Functions
XXIV. 目录函数库
XXV. DOM Functions
XXVI. DOM XML Functions
XXVII. .NET Functions
XXVIII. Error Handling and Logging Functions
XXIX. Exif Functions
XXX. File Alteration Monitor Functions
XXXI. FrontBase Functions
XXXII. filePro Functions
XXXIII. 文件系统函数库
XXXIV. Forms Data Format Functions
XXXV. FriBiDi Functions
XXXVI. FTP 函数库
XXXVII. Function Handling Functions
XXXVIII. Gettext
XXXIX. GMP Functions
XL. HTTP 相关函数库
XLI. Hyperwave Functions
XLII. Hyperwave API Functions
XLIII. iconv Functions
XLIV. 图像函数库
XLV. IMAP, POP3 and NNTP Functions
XLVI. Informix Functions
XLVII. Firebird/InterBase Functions
XLVIII. ID3 Functions
XLIX. Ingres II Functions
L. IRC Gateway Functions
LI. PHP / Java Integration
LII. LDAP Functions
LIII. LZF Functions
LIV. Mail Functions
LV. mailparse Functions
LVI. 数学函数库
LVII. Multibyte String Functions
LVIII. MCAL Functions
LIX. Mcrypt Encryption Functions
LX. MCVE Payment Functions
LXI. Memcache Functions
LXII. Mhash Functions
LXIII. Mimetype Functions
LXIV. Microsoft SQL Server Functions
LXV. Ming functions for Flash
LXVI. Miscellaneous Functions
LXVII. mnoGoSearch Functions
LXVIII. mSQL Functions
LXIX. MySQL 函数库
LXX. Improved MySQL Extension
LXXI. Mohawk Software Session Handler Functions
LXXII. muscat Functions
LXXIII. Network Functions
LXXIV. Ncurses Terminal Screen Control Functions
LXXV. Lotus Notes Functions
LXXVI. NSAPI-specific Functions
LXXVII. ODBC Functions (Unified)
LXXVIII. Object Aggregation/Composition Functions
LXXIX. Oracle 8 函数库
LXXX. OpenAL Audio Bindings
LXXXI. OpenSSL Functions
LXXXII. Oracle 函数库
LXXXIII. Ovrimos SQL Functions
LXXXIV. 输出控制函数
LXXXV. Object property and method call overloading
LXXXVI. Parsekit Functions
LXXXVII. PDF functions
LXXXVIII. Verisign Payflow Pro Functions
LXXXIX. PHP Options&Information
XC. POSIX Functions
XCI. PostgreSQL 数据库函数库
XCII. Process Control Functions
XCIII. Program Execution Functions
XCIV. Printer Functions
XCV. Pspell Functions
XCVI. GNU Readline
XCVII. GNU Recode Functions
XCVIII. 正则表达式函数库(Perl 兼容)
XCIX. qtdom Functions
C. 正则表达式函数库(POSIX 扩展)
CI. Semaphore, Shared Memory and IPC Functions
CII. SESAM Database Functions
CIII. Session Handling Functions
CIV. Shared Memory Functions
CV. SimpleXML functions
CVI. SOAP Functions
CVII. SQLite
CVIII. Shockwave Flash Functions
CIX. SNMP 函数库
CX. Socket Functions
CXI. Standard PHP Library (SPL) Functions
CXII. Stream Functions
CXIII. 字符串处理函数库
CXIV. Sybase Functions
CXV. TCP Wrappers Functions
CXVI. Tidy Functions
CXVII. Tokenizer Functions
CXVIII. URL 函数库
CXIX. 变量函数库
CXX. vpopmail Functions
CXXI. W32api 函数库
CXXII. WDDX Functions
CXXIII. xattr Functions
CXXIV. XML 语法解析函数库
CXXV. XML-RPC 函数库
CXXVI. xdiff Functions
CXXVII. XSL functions
CXXVIII. XSLT Functions
CXXIX. YAZ Functions
CXXX. YP/NIS Functions
CXXXI. Zip File Functions (Read Only Access)
CXXXII. Zlib Compression Functions



add a note add a note User Contributed Notes
函数参考
master at dreamphp dot com
28-Oct-2003 08:08
// kill-time. complicatedly source ... ^^;;;

function roma_to_number ($string) {
 $len = strlen($string);
 $sum = 0;
 for ($i=0;$i<$len;$i++) {
   switch ( $string{$i} ) {
     case 'I': // 1
       $sum+=1;
       break;
     case 'V': // 5
     if ( $string{$i-1} == 'I' ) $sum+=3;
       else                      $sum+=5;
       break;
     case 'X': // 10
       if ( $string{$i-1} == 'I' ) $sum+=8;
       else                       $sum+=10;
       break;
     case 'L': // 50
       if ( $string{$i-1} == 'X' ) $sum+=30;
       else                       $sum+=50;
       break;
     case 'C': // 100
       if ( $string{$i-1} == 'X' ) $sum+=80;
       else                       $sum+=100;
       break;
     case 'D': // 500
       if ( $string{$i-1} == 'C' ) $sum+=300;
       else                       $sum+=500;
       break;
     case 'M': // 1000
       if ( $string{$i-1} == 'C' ) $sum+=800;
       else                       $sum+=1000;
       break;

   }
 }
 return $sum;
}

// example
echo roma_to_number('MCMXCVIII').'-'.roma_to_number('MMIII');
// output 1998-2003
philip at cornado dot com
31-Jul-2001 07:39
Function Quick Reference :
* http://www.php.net/quickref.php

<PHP 的命令行模式Apache>
 Last updated: Fri, 22 Jun 2007
view source | feedback | send page | sitemap | aboutus   
Copyright ® 2002-2003 PHPE.NET. All rights reserved
Last updated:2002-11-22