PHP Optimization for Millions Visits Level
PHP Optimization for Millions Visits Level from Ho Kim Cheers~ Continue reading
PHP Coding Standard and 50+ Programming Skills
PHP Coding Standard and 50+ Programming Skills from Ho Kim @see http://www.kimbs.cn/category/coding-standards/ @see http://framework.zend.com/wiki/display/ZFDEV/PHP+Coding+Standard+(draft) @see http:/… Continue reading
Posted in Coding Standards, Optimization, PHP, Training
Tagged Coding Skills, Coding Standards, Optimize, PHP, Programming
3 Comments
MongoDB Basics and Tutorial
MongoDB Basics and Tutorial from Ho Kim The bug : https://bugs.php.net/bug.php?id=60508 Cheers~ Continue reading
Replace Accents by Normal Unaccented in PHP
Sometimes we need the string to only contain unaccented characters, for example urls, xml, filename etc. Expecially before PHP6, You may think of function setlocale() and iconv(), but they are evil...… Continue reading
PHP-FPM for RHEL
1. Patch PHP-FPM to PHP [codesyntax lang="bash"] $ wget http://php-fpm.org/downloads/php-5.2.17-fpm-0.5.14.diff.gz $ wget http://cn.php.net/distributions/php-5.2.17.tar.bz2 $ tar -jxf php-5.2.17.tar.b… Continue reading
XHProf for PHP Profile
Environment : php 5.2.14 xhprof 0.9.2 graphviz 2.26.3 1. Download and install xhprof : [codesyntax lang="bash"] $ wget http://pecl.php.net/get/xhprof-0.9.2.tgz $ tar -xzf xhprof-0.9.2.tgz $ cd xhprof-… Continue reading
Encode PHP by ionCube
1. Environment : PHP 5.2.14 PHP-FPM 0.5.14 2. Encode with ionCube : Download(purchase or try free trial) ionCube encoder from http://www.ioncube.com/ [codesyntax lang="bash"] $ cd /data/soft_misc/ $ t… Continue reading
Install eAccelerator for PHP
1. Environment : PHP 5.2.14 : /usr/local/webserver/php PHP-FPM 0.5.14 : /usr/local/webserver/php/etc/php-fpm.conf eAccelerator 0.9.6.1 : /data/soft_misc/eaccelerator-0.9.6.1.tar.bz2 2. Install eAccele… Continue reading
Compile Mysql Extension for PHP
1. PHP Source : /home/kim/php-5.3.3 Path : /usr/local/php 2. Compile Mysql Extension [codesyntax lang="bash" lines="no" container="pre" tab_width="4"] $ cd /home/kim/php-5.3.3/ext/mysql/ $ /usr/local/… Continue reading
PHP Compile and Install
1. Depend Libs [codesyntax lang="bash" lines="no" container="pre" tab_width="4"] $ sudo apt-get install gcc $ sudo apt-get install autoconf $ sudo apt-get install libxml2-dev $ sudo apt-get install li… Continue reading
Nginx and PHP for Windows
1. Environment Window XP Nginx 0.8.50 PHP 5.2.14 2. Download Nginx Unzip to D:\nginx-0.8.50 3. Download PHP Unzip to D:\nginx-0.8.50\php-5.2.14 4. Create D:\nginx-0.8.50\php-5.2.14\php.ini cgi.fix_pat… Continue reading
Custom PHP Extension in C
For Linux (Ubuntu Server) 1. Installation [codesyntax lang="bash" lines="no" container="pre" tab_width="4"] $ sudo apt-get install gcc $ sudo apt-get install php5-dev [/codesyntax] 2. PHP Source Packa… Continue reading
Xdebug for PHP Profile
Windows 1. Download xdebug extension : http://www.xdebug.org/files/php_xdebug-2.1.0-5.2-vc6.dll 2. Add xdebug extension into php : E:\xampp\php\ext\php_xdebug-2.1.0-5.2-vc6.dll 3. Modify php.ini : [co… Continue reading
PHP Coding Standards (5) – Errors and Exceptions
1. The Zend Framework codebase must be E_STRICT compliant. Zend Framework code should not emit PHP warning (E_WARNING, E_USER_WARNING), notice (E_NOTICE, E_USER_NOTICE), or strict (E_STRICT) messages … Continue reading
PHP Coding Standards (4) – Inline Documentation
1. Docblocks start always with "/*" or "/**". The use of "#" is not allowed. The " //" is only allowed for comments within functions. For example : [codesyntax lang="php"] /** * Class docblock */ clas… Continue reading
PHP Coding Standards (3) – Coding Style
1. PHP code must always be delimited by the full-form, standard PHP tags. Short tags are only allowed within view scripts. For example : [codesyntax lang="php"] <?php // Php code here ?> [/codesyntax]… Continue reading
PHP Coding Standards (2) – Naming Conventions
1. The Zend Framework employs a class naming convention whereby the names of the classes directly map to the directories in which they are stored. Based on PEAR Coding Standards , we can easily find t… Continue reading
PHP Coding Standards (1) – File Formatting
1. For PHP files the closing tag (" ?> ") is to be omitted. It is not required by PHP, and omitting it prevents trailing whitespace from being accidentally injected into the output. In fact the proble… Continue reading
PHP Coding Standards – Preview
Zend had provided the guidelines for developers and teams working on or with Zend Framework. Details posted on : http://framework.zend.com/wiki/display/ZFDEV/Zend+Framework+Contributor+Guide . Within … Continue reading