Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Chris Jones:
Quick Debugging of PHP Scripts in Emacs with Geben and Xdebug
Jan 24, 2013 @ 17:19:47

Chris Jones has a new post showing how you can use Emacs and Xdebug for debugging with the help of the geben plugin.

When you want to test a PHP code snippet quickly, it's handy to do it within your day-to-day environment. For me, this environment is Emacs. The geben package for Emacs provides an interface to the DBGp protocol, such as used by Derick Rethans's standard Xdebug extension for PHP. With the combination of geben and Xdebug, I can quickly and efficiently step through execution of local files, examining code flow and data values.

He includes a ten step process (step 11 is basically "use it") that walks you through the installation of the full stack - PHP, Xdebug and geben - and the configuration changes you'll need to make to get them all working together. Some basic usage instructions are included, but if you want more details on using geben, check out the project's site.

tagged: emacs xdebug tutorial install debug engen plugin

Link:

Christian Weiske:
PHP_CodeSniffer: notify-send report
Aug 15, 2012 @ 14:54:07

In a new post to his site Christian Weiske shares an update he contributed to the PHP_CodeSniffer functionality to make working with and checking the validity of local PHP code easier - a notifier for PHP_CodeSniffer using the "notify-send" commonly installed in most Linux distributions.

I use emacs as IDE, and wanted to have direct feedback about the validity of my .php files when writing them. The most easy way was to add a save hook that runs PHP_CodeSniffer - but the results should be displayed in a nice, unobtrusive way. phpcs has multiple reporting modes - xml, checkstyle, csv etc. - but nothing for the desktop. I thought that notify-send would be the right fit since it is able to display pretty popup messages without getting in the way.

He also includes the details on his original objective - including it in a "on save" hook as well as providing it in a keystroke shortcut, making checking his code even easier.

tagged: codesniffer notifysend popup emacs desktop

Link:

PHPFreak.dk:
The quest for the holy... development environment?!
Apr 26, 2010 @ 17:05:07

On the PHPFreak.de blog there's a new post talking about the author's quest to find the "holy development environment", the one that would make a developer most productive and give them the best features to do their work.

Over the last 8 years I've tried out a lot of different setups. I've always loved Emacs, and for many years my setup was very basic: Linux/FreeBSD desktop, Fluxbox, Xterm, Emacs and Firefox - simple and powerful, and I loved it but I want more. I want my environment to be a bit smarter and not just provide me with some (very, very nice) shortcuts for navigating my code.

He looks at a few other tools and how they compare to what he's used to - VIM, NetBeans, Eclipse PDT - and decides that there's not a clear winner between them and that really, it boils down to two things: what your preference is and what quirks you can deal with on a daily basis.

tagged: development environment eclipse vim emacs netbeans

Link:

Community News:
php-mode (PHP documentation integration for Emacs)
Dec 28, 2009 @ 20:41:05

Roberto Aloi has put together a tool for Emacs that allows you to directly browse the PHP documentation without hopping out of the editor.

php-mode is a set of tools to increase productivity in Emacs when programming PHP. It can be used in conjunction with any other pre-existing PHP mode for Emacs.

You can see an example of it in action in this screenshot and can install it via the five or six steps included in the page (that include downloading the latest "many HTML files" option from the PHP.net documentation page).

tagged: phpmode documentation integrate emacs

Link:

Local.ch Blog:
Debug php in emacs with geben
Aug 08, 2008 @ 16:18:09

On the local.ch blog today, there's this new post (from Philipp Kelle) showing how to, with the help of geben, easily debug your applications from emacs.

While PHP-developing it sometimes is just too tedious to do those 'add a echo here and there, then reload and search the echoed strings on the screen'-loops. So I searched for a debugger for my favourite editor emacs. After a lengthy install procedure I finally got it running: With geben on emacs you can debug PHP (step through and evaluate expressions).

The post steps you through the installation - adding in xdebug, changing the PHP configuration, and getting and installing geben (along with other required packages).

tagged: emacs geben debug application xdebug

Link:

SitePoint PHP Blog:
Index of PHP tokens for Emacs and beyond
Nov 19, 2007 @ 20:38:00

Troels Knak-Nielsen has posted a script that he's developed (for use in Emacs) to look through a PHP file and pull out all of the classes and functions found inside.

As you probably know, PHP has a ridiculous amount of functions for all kinds of things, and as it happens, token_get_all gives access to the Zend Engine tokenizer. In other words, the same chunk of code, which PHP itself uses, when reading a .php file. This provides an excellent base for writing a script, which can parse the socks off ctags.

The emacs file to bind the editor and the PHP script together is also included, making it as simple to use as binding the function key of your choice to the "php-tokens" script.

tagged: emacs script token tokengetall integrate emacs script token tokengetall integrate

Link:

SitePoint PHP Blog:
Index of PHP tokens for Emacs and beyond
Nov 19, 2007 @ 20:38:00

Troels Knak-Nielsen has posted a script that he's developed (for use in Emacs) to look through a PHP file and pull out all of the classes and functions found inside.

As you probably know, PHP has a ridiculous amount of functions for all kinds of things, and as it happens, token_get_all gives access to the Zend Engine tokenizer. In other words, the same chunk of code, which PHP itself uses, when reading a .php file. This provides an excellent base for writing a script, which can parse the socks off ctags.

The emacs file to bind the editor and the PHP script together is also included, making it as simple to use as binding the function key of your choice to the "php-tokens" script.

tagged: emacs script token tokengetall integrate emacs script token tokengetall integrate

Link:


Trending Topics: