fixed example to work on PHP 5.3