gog's info

<?php echo array_rand(array('web', 'dev', 'computers')); ?>

Archive for the ‘PHP’ tag

Hudson and PHP Howto

without comments

After a couple of weeks of playing with phpUnderControl and reading some nice reviews of Hudson I decided to give it a try. And boy am I glad I did.

Hudson definitively won me over with its clean interface and easy to setup tasks. Even plugin installation is a breeze and you can even do it right out of the comfort of your browser.

I found a quite nice tutorial about setting up Hudson with PHP here but I had some questions marks hovering over my head during the installation so I have decided to write a more detailed installation tutorial.

If you are running a Debian flavored distribution (yes I mean Ubuntu) take a look at the tutorial, you should have Hudson working with your PHP projects in no time.

Bonus points if you integrate your Hudson installation to act as your staging server.

Written by Goran Jurić

November 6th, 2009 at 8:53 pm

Install phpUnit on Mac OSX 10.6

without comments

Here is another quick How-to so I don’t have to look it up next time.

Open up Terminal.app and enter “sudo su” and enter your password when asked (I guess you must be using an account with administrator privileges).

pear upgrade PEAR
pear channel-discover pear.phpunit.de
pear install –alldeps phpunit/PHPUnit

That’s it. phpunit binary should be in your path now.

p.s.

For some reason phpUnit that is being used by Zend Studios (6.1) does not have mbstring extension compiled and that makes it unusable for me. I guess there is a way to force PHP interpreter that is being used in the Zend Studio to run with the mbstring extension, but this is a faster approach. Hudson or phpUnderControl (whichever you like) will take care of the code coverage reports.

Written by Goran Jurić

November 2nd, 2009 at 5:08 pm

Posted in PHP

Tagged with , , ,

“Benchmarking” PHP frameworks

without comments

Although I am not a Drupal user, the chance to visit Drupalcon in Szeged (Hungary) appeared and I couldn’t pass on that one. We got there a little bit late, but just in time to hear Rasmus Lerdorfs keynote speech Simple is Hard. There are some really good ideas for optimizing your applications performance and I strongly recommend it for every PHP developer.

There were also some things I really don’t agree that much. He showed a small PHP frameworks “benchmark” measuring the speed (response time and transactions per second) for each of this frameworks to output the simple HTML page printing out the “Hello world” string. Zend Framework (the framework of my choice) didn’t perform all that bad. Symfony was around 30% slower, and Solar was about 2 times faster. If you are really interested in the numbers have a look at the slides from the session.

Read the rest of this entry »

Written by Goran Jurić

August 29th, 2008 at 3:55 pm