Posts Tagged ‘PHP’

I recently found this video on youtube about using netbeans for PHP with xdebug.
Also kCacheGrind is extensively demonstrated in this video.
(They analyse a wordpress blog, aka what you are looking at)

The interesting part of course is to see what takes how many resources and or time in your functions.
I’m really considering going over all my home projects when they are done to see what can be improved.
Not only can you improve the execution time of your already existing code, this also shows witch methods or structures are better then others for certain situations.

To watch all parts in a playlist, click here.

Anonymous functions in PHP

Author: sandshark

I recently discovered that since PHP 5.3.0 there are anonymous functions, also called lambda functions available.
This is a very nice feature especially for registering a simple callback.

An example:

$func = function($value) {
 return $value * 2;

print_r(array_map($func, range(1, 5)));

More information in the PHP Documentation can be found here.

Also, im am trying to post more frequently, and soon reports of my trip to the states will come up here too.