News Feed
Sections
News Archive


Community Events
php|tek 2008 PHP Conference



feed this:

Developer Tutorials Blog:
Running PHP cron jobs - regular scheduled tasks in PHP
0 comments :: posted Friday May 16, 2008 @ 09:32:25
voice your opinion now!

On the Developer Tutorials blog, Akash Mehta has posted an introduction to working with command-line PHP scripts and cron jobs for site automation.

Scheduled tasks are a fairly common feature in modern web applications. From cleaning out caches every 24 hours to checking subscription periods and even generating reports, more web applications live by the clock than ever before. But how do we schedule the execution of a PHP script on the server side?

He shows the two key things to getting it working - an example of a command-line call to a PHP script (executed through his /usr/bin/php) and an example of a line from a crontab showing how to execute the script at midnight every day.

tagged with: cron job crontab commandline execute schedule task tutorial


Developer Tutorials Blog:
Testing PHP with the interactive shell
1 comment :: posted Monday May 12, 2008 @ 07:57:34
voice your opinion now!

Akash Mehta shares a helpful hint in this new post to the Developer Tutorials Blog today - testing out PHP code via the command line PHP binary.

Thankfully, PHP provides the interactive shell, allowing you to test out PHP interactively with immediate feedback. Here's how to take advantage of this mature feature of PHP.

With the help of the "-a" flag on the command line, the PHP binary will hand you an environment where you can code PHP and instantly see the results. He does mention a few quirks that make it different than working with PHP through a web server, namely moving in and out of code blocks and remembering to finish out with a semi-colon when the line is done.

tagged with: test interactive shell binary tutorial commandline

Debuggable Blog:
Running Tests from The Commandline in CakePHP
0 comments :: posted Thursday May 08, 2008 @ 10:27:41
voice your opinion now!

New on the Debuggable blog today there's this post from Tim Koschutzki about a new feature he's contributed back to the CakePHP project. It allows you to run tests on the command line without having to worry about loading up a web interface to check your code.

It allows you to run all of the following: all core testcases at once, all core test groups, each core test case individually, all application-specific testcases at once, all application-specific test groups and each core test case individually. It also supports plugins, which means you can run plugin cases and groups.

He includes some samples of how it works - a few command line calls and what the output looks like.

tagged with: test unittest commandline cakephp framework testsuite

Sebastian Bergmann's Blog:
Test Runner Improvement in PHPUnit 3.3
0 comments :: posted Friday April 11, 2008 @ 09:46:29
voice your opinion now!

Sebastian Bergmann has posted some details about an update that's been made to the test runner for the PHPUnit (3.3) unit testing suite - an allowance for directories instead of just files on the command line.

Given a directory, the test runner will recursively scan the directory for *Test.php files, build a test suite out of the *Test classes, and run it.

PHPUnit is framework that makes writing tests for your code easy and also includes functionality to run the tests and analyze their results.

tagged with: test runner improvement phpunit commandline directory file


application pecl release package PHP5 zend job security code developer zendframework database conference releases PEAR cakephp framework mysql book ajax

All content copyright, 2008 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework