PHP tokens and opcodes : 3 useful extensions for understanding the working of Zend Engine

Posted 11 CommentsPosted in PHP
"PHP tokens and opcodes" - When a PHP script is executed it goes through a number of processes, before the final result is displayed. These processes are namely: Lexing, Parsing, Compiling and Executing. In this blog post, I will walk you through all these processes with a sample example. In the end I will list some useful PHP extensions, which can be used to analyze results of every intermediate process. Lets take a sample PHP script as an example: <?php function increment($a) { return $a+1; } $a = 3; $b = increment($a); echo $b; ?> Try running this script through...

MySQL Query Cache, WP-Cache, APC, Memcache – What to choose

Posted 44 CommentsPosted in PHP, Scalability
Hello Cache Freaks, Ever since I changed my job (from Business Intelligence to Web development) and started working with my present employer, I have had a chance to work on a lot of scalable projects. From making my project to scale from 20 Million PV's to 100 Million PV's to development of an internal tool, the answer to all scalable applications have been caching. There are a lot of caching techniques which are being employed by sites worldwide. WP-Cache used in wordpress - a file system based caching mechanismAPC Cache - an opcode based caching systemMemcache - an in memory...