schlitt.info - php, photography and private stuff ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Author: Tobias Schlitt :Date: Wed, 19 Nov 2008 23:29:46 +0100 :Revision: 1 :Copyright: CC by-nc-sa ========================================== FrOSCon "PHP best practices" slides online ========================================== :Description: Kore and me held our talk about "PHP best practices" this morning at the Free and Open Source software Conference and were quite successful, AFAICT. There were about 50 attendees, which listened concentrated over the whole time. The talk contains an overview on how to behave when coding PHP in respect to `Kore`__ and me held our talk about "`PHP best practices`__" this morning at the `Free and Open Source software Conference`__ and were quite successful, AFAICT. There were about 50 attendees, which listened concentrated over the whole time. The talk contains an overview on how to behave when coding PHP in respect to .. __: http://kore-nordmann.de .. __: http://talks.php.net/show/php-best-practices/0 .. __: http://froscon.org - General guidelines - Security - Performance and gives a general overview on useful tools around PHP development. You can find the slides in the `php.net talks section`__. .. __: http://talks.php.net/show/php-best-practices/0 **Correction, June 30th 2006**: Ok, the guys from my usergroup convinced me to correct this. There were about 100 attendees in the talk, not only 50. :) .. Local Variables: mode: rst fill-column: 79 End: vim: et syn=rst tw=79 Trackbacks ========== - PHPUGDO plans "PHP introduction workshop" on Sun, 16 Jul 2006 13:29:50 +0200 in Tobias Schlitt - a passion for php During our last usergroup meeting here in Dortmund (last Thursday), the idea came up to organize a "PHP introduction day", if there is enough interesst in the local area. The idea resulted from the success of Kores and my "PHP best practice Comments ======== - Wim H. at Sun, 25 Jun 2006 16:42:49 +0200 You wrote in there: "allways use ++$i instead of $i++" (in for loops). Why is that? - Toby at Sun, 25 Jun 2006 16:51:13 +0200 Oh, the wording was incorrect here. I rephrased it to "Where possible use...". Surely it is not allways possible, since post- and pre-increment operators are still semantically different. Anyway, there are tons of places, where ++$i is as appropriate as $i++ and the first one is simply much faster in PHP. Thanks for the hint! - Wim H. at Mon, 26 Jun 2006 10:54:44 +0200 Interesting. I'd have thought that two so nearly identical functions would be nearly identical in speed as well. But the difference is indeed significant and in such a for loop, I can't think of any (other) reason to prefer one over the other. In my quick benchmark (PHP 5.1.4 on Debian Linux) an (empty) for loop with ++$i was 11% faster than one with $i++. - Toby at Mon, 26 Jun 2006 11:32:35 +0200 Yeah, that is what we gathered also. - fifi at Sat, 25 Dec 2010 18:50:51 +0100 hellloooo