All the assumption I want to remember in PHP

Probably linked to some alcohol I drank to young, I always forget some key assumption in PHP. NULL is NULL NULL is EMPTY NULL is FALSE NULL has a sizeof 0 BUT FALSE is not NULL FALSE is EMPTY FALSE is FALSE FALSE has a sizeof 1 AND empty ARRAY is not NULL empty ARRAY [...]

Open Dojo v1.0

Subject list for an open dojo / bbq session As Jedi phpunit and code coverage phing deployment svn and continuous integration As Padawan Working agile Scrum Now let’s decide a timeline

Continuous Integration phpunit code coverage use a bit less than 2 Gigs !!!

2 gigs !!! gasp… I had several: Generating code coverage report, this may take a moment.PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 21503527 bytes) in /usr/share/php/PHPUnit/Util/Report/Node/File.php on line 406 And here is how it started: At work we are using phpunit to test our framework, we flew from SimpleTest [...]

installing xdebug on ubuntu with Zend Server CE (not solved yet)

You need to sudo user@laptop:~$ sudo bash 1st be sre to have the pecl, pear available as root in command line root@laptop:~# PATH=$PATH:/usr/local/zend/bin trying to install root@laptop:~# pecl install xdebug downloading xdebug-2.1.0.tgz … Starting to download xdebug-2.1.0.tgz (301,354 bytes) ……………………………………………..done: 301,354 bytes 66 source files, building running: phpize Configuring for: PHP Api Version: 20041225 Zend [...]

Zend Server CE | PDO | ubuntu 9.10 | /tmp/mysql.sock

You are using PDO and Zend Server CE and Ubuntu 9.10 You have a little problem? This is The solution (thanks to @DwebConsulting). sudo service mysql stop sudo cp /etc/mysql/my.cnf /etc/mysql/my.cnf.bak sudo cp /etc/mysql/debian.cnf /etc/mysql/debian.cnf.bak sudo vim /etc/mysql/my.cnf replace every line starting with “socket =” by “socket = /tmp/mysql.sock” sudo vim /etc/mysql/debian.cnf replace every line [...]

Firefox Ubiquity php search handy command

Just created a Firfow Ubiquity php search command based on 2 other work: http://download.sbw.be/projects/ubiquity/php-search.html

PHP test – #1

What happens with the following code: <?php for($i=a;$i&lt;=z;$i++) echo("$i\n"); ?> And what’s the difference with? <?php for($i=a;$i&lt;z;$i++) echo("$i\n"); ?> Why is the result different? and How? … Worst: <?php $i=a; while(strcmp($i,z)<=0){ echo($i."\n"); $i++; } ?> Gives exactly the same result as the second exemple. … hints: http://www.php.net/manual/en/language.types.string.php#language.types.string.conversion http://www.php.net/manual/en/language.operators.comparison.php http://www.php.net/manual/en/language.types.string.php

Coding Dojo

@ São Paulo University http://www.dtsato.com/blog/wp-content/uploads/2008/06/sato-codingdojo.pdf Session process: Problem choosing (5 min) Problem discussion (10 min) Coding session (1h) Retrospective (10 min) 2 Style of coding sessions: Randori dojo Prepared Kata Session roles: Moderator: Moderating the discussion, conducting the retrospective Organizer: Room Reservation, setting up computer, projector, sending reminder, preparing the program, cleaning the room Scribe: [...]