Archive for August 23rd, 2006

Reading, Writing and Creating Files in PHP

Reading and writing to files can be useful if you do not require the storing of important data such as a web counter. I must warn you though that this method of storage should not be used to store passwords and other critical information as it is not safe. Here we will discuss how to handle files and directories in PHP specifically how to create read and write them….

(Advertisement) Professional Trac Hosting Simple Project Management with Trac - Integrated Source Control, Bug Tracking, Wiki, Progress Tracking - Secure, Reliable, Easy - Start Your Free Trial Today

Continue Reading · Add comment

Community News: Latest PHPClasses.org Releases for 08.23.2006

Latest PHPClasses.org Releases:

Continue Reading · Add comment

Sebastian Bergmann’s Blog: Visualizing Text Differences in PHPUnit 3

Sebastian Bergmann has posted this new item on his blog today detailing how to tell the differences between two strings inside of PHPUnit 3.

A long-standing feature request for PHPUnit has been the generation of a real diff between strings that span multiple lines.

Ideally this would be done by implementing the diff algorithm in PHP. But since Derick needed a working solution quickly, the two of us came up with a “hack”: we just use GNU diff and invoke the diff command via shell_exec().

He gives an example, showing how to judge the difference between two strings of HTML in a test. The result catches the differences (inside the body tags) easily.

Continue Reading · Add comment

Community News: Latest PECL Releases for 08.23.2006

Latest PECL Releases:

Continue Reading · Add comment

Tobias Schlitt’s Blog: Comfortable PHP editing with VIM -5-

Tobias Schlitt has picked by up his “comfortable PHP editing in VIM” series today with this lengthy post with loads of helpful VIM tips to share with PHP developers everywhere.

More than a half year after my last “Comfortable PHP editing with VIM” post, I take up this series again, although I decided to let it die in January. Sadly I did not find any time by now, to extend PDV (the PHP Documentor for VIM plugin) further than it’s version 1.0.1, which is available through vim.org and on my SVN. Anyway, I collected a lot of (at least for me) helpful VIM tips, which I’d like to share here

The post contains tons of tips on subjects such as:

  • Find matching brace
  • Indenting and unindeting
  • Emergency help
  • Macros

and many more. For each subject, there’s an explaination of a situation you might need it in and, of course, the tip itself. He also links to the earlier parts of the series (one through four) for those wanting to catch up.

Continue Reading · Add comment