PHP Québec::Montréal – June edition

Yesterday was the june meeting for the Montreal instance of the PHP Québec group. The meeting was divided into 2 parts which were : XDebug, KCacheGrind and Flood (HttpLoad-like) presented by Yann Larrivée and Runkit (a PECL package) presented by Sean Coats.

First of all, Yann introduced us to XDebug which is a cool tool to analyse your PHP applications. It analyzes the time it takes for a script to run, ammount of total memory it requires, etc. Of course it details every part of your applications such as functions, classes, etc. KCacheGrind is a tool that can visually show the results by parsing the results files. Yann ran XDebug on TikiWiki and find pretty interesting things. The wiki’s index page does about 400 SQL queries to show itself on the screen. Then, he tested Flood for us (which does the same things as HttpLoad) on the same TikiWiki. Interesting fact here : a 400mhz computer can’t hold more than 13 request of the same TikiWiki page. Anyway, a nice utility of KCacheGrind is that, with the help of GraphViz, creates a graphic of your applications’ classes and function and the relationship between them. I think it’s a nice way to introduce someone into a project.

Then, Sean presented us Runkit. It’s a nice little extension which can do many things. First you can, without quitting and request your script again (mainly useful for Bots) change your Classes, Functions or Constant on the fly. Another functionnality is that you can create SandBoxes. A SandBox runs in its own thread and can’t use your main application’s ressources. Pretty neat. But there’s so much to say about Runkit, you’ll have to check for yourself, wait for my little example, or come to a future meeting of PHPQuébec in Drummondville ;).