You may have read that using the short echo tag ( <?= ) should be avoided, especially for WordPress development. The convenience is really nice though, so here’s a quick summary of when you can safely use it in your code.
If you are developing a WordPress plugin, t is a very good idea to write some automated tests for it. Pound is a light weight WordPress plugin that has makes it easy to get started with testing. The main point was to help plugin developers test more easily and more frequently. This is an overview and tutorial for using Pound to unit testing WordPress plugins.
Last week we talked about application shelf life an aspect of PHP development that often goes overlooked. This week let’s talk about how the web development framework you use contributes to the shelf life of your app and the profitability of your web application.
Photo provided by Jonas Bengtsson
I plan to write a series of posts about how we develop, deploy, and support our affiliate software and digital downloads applications. And why, after 5 years of Ruby on Rails development we switched back to PHP. One of the reasons is what I refer to as the shelf life of a web application. Let’s talk about what happens to a web application if you just let it sit.
Every time someone shows me something they like about some other editor it is always fun to show how the same thing can be done in vim. A popular thing in modern editors now seems to be multiple cursors and folks get excited about appending some text to a bunch of lines all at the same time.
Sublime Text 2 is a really nice text editor with a lot of power behind it. It also has a “Vintage” mode for folks who fancy vim, such as myself. I also happen to enjoy exploring new software, especially text editors, and Sublime Text 2 is my current favorite text editor. The only majorly annoying thing about Sublime Text 2 is the way it handles word wrapping. Periods (.) can sometimes wrap to the next line making it look like you have a mistake in your writing. This is only a problem when writing paragraphs, like in Markdown for blog posts.
Back in 2007 I wrote an article titled PHP vs Ruby – Practical Language Differences which drew a fair amount of attention. Now that I’ve been working with Ruby in much more depth and both PHP and Ruby have matured dramatically over the past five years it is time to reevaluate the comparison.
When developing PHP apps I often want to run the current file and see the results. Sometimes I even want to save those results, or perhaps manipulate the results. So I wrote this little vim function to run my currently open PHP file and place the results in a new VIm buffer.
Here are some of my favorite tips for working in Vim. I use MacVim but everything below should apply to any version of Vim you are using. Vim is such an amazingly powerful editor you can use it for years and still learn new stuff all the time. This is a small collection of features I use most often and find most helpful. Hopefully they will be helpful to you as well.
Here is a TextMate command that will convert all of the selected text from camelCase to snake_case. This command is specifically designed for PHP. Thanks to PHP not having namespaces (until recently) many developers use PEAR naming conventions resulting in code that has class names like BP_Common::fancy_function(). This command will not convert the BP_Common.