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

Christian Scheb:
Introducing Tombstones for PHP
Sep 17, 2015 @ 12:49:23

Christian Scheb has posted about an interesting idea in this article on his site - creating "tombstones" in your application to help you determine what code in your application is "dead".

Earlier this year I took over that project at my new company. [...] The repository was cluttered by many files, that could assumed to be dead code. Unfortunately, you never know. [...] The mission was clear: Cleaning up the project, without breaking things.

[...] I searched the web and came across that interesting concept of tombstones. If you haven’t heard of tombstones yet, I highly recommend this article and watching the video of David Schnepper’s ignite talk. A tombstone is basically an executable marker in your code (in the PHP world: a function call), which is placed in fragments of code, that you’ve assumed to be dead. Then, everything is deployed to production and, when a tombstone is invoked, it writes some data to a log. After a while, the logs will enable you to identify dead and undead code (called “Vampires”) in your project.

Not finding a good tool to help with this in an existing codebase, he created a library that makes it simpler to both mark the "tombstones" in your code and another to analyze the results. He includes an example of what the report might look like, showing both the used and unused bits of code where the tombstone code was placed.

tagged: tombstones dead code library analyzer marker

Link: http://www.christianscheb.de/archives/717

PHPImpact Blog:
Using Annotations in PHP
Jul 22, 2008 @ 07:55:04

On the PHP::Impact blog today there's a new post showing how to use annotations in your application's code that can be used by the Addendum library.

Annotations provide data about a program that is not part of the program itself. They have no direct effect on the operation of the code they annotate. In PHP, annotations can only be read reflectively at run time.

They allow you to document, with meta-data, information about the classes, methods and variables inside the script. They show three of the annotation types - a marker, a single-value and a multi-value.

tagged: annotations addendum library marker singlevalue multivalue

Link:

PHP-GTK Community Site:
Blogging about PHP-GTK
Feb 19, 2007 @ 10:57:00

The PHP-GTK Community site has introduced a new feature for members of the site - the ability to create and write to their own blog right there on the site.

These are the most visible sign of a new feature on the site: registered members now have their own blog on the site, and blogging about a manual update, community story or recent page is just one click away.

Clicking on the "small, dark, lowercase 'b' marks" on their site (when logged in, of course) will allow users to blog about a specific item or piece of content on the site. You can still create free-form posts, but this is a shortcut to prepopulating some of the details about the content without having to cut and paste or type it in yourself.

Check out the PHP-GTK Community site and check out this post for more information on how you can get started.

tagged: phpgtk blogging content access marker phpgtk blogging content access marker

Link:

PHP-GTK Community Site:
Blogging about PHP-GTK
Feb 19, 2007 @ 10:57:00

The PHP-GTK Community site has introduced a new feature for members of the site - the ability to create and write to their own blog right there on the site.

These are the most visible sign of a new feature on the site: registered members now have their own blog on the site, and blogging about a manual update, community story or recent page is just one click away.

Clicking on the "small, dark, lowercase 'b' marks" on their site (when logged in, of course) will allow users to blog about a specific item or piece of content on the site. You can still create free-form posts, but this is a shortcut to prepopulating some of the details about the content without having to cut and paste or type it in yourself.

Check out the PHP-GTK Community site and check out this post for more information on how you can get started.

tagged: phpgtk blogging content access marker phpgtk blogging content access marker

Link:

PHP-GTK Community Site:
Using GtkSourceview to build a php editor with syntax highlighting
Dec 19, 2006 @ 08:34:00

There's a new tutorial posted on the PHP-GTK Community site today - a quick one showing how to use GtkSourceview to create a simple PHP editor with syntax highlighting.

This widget is nearly usable as a real php-gtk IDE. It extends GtkSourceView widget and internally manages both a text buffer and language object classes.

They provide the code, but not too much in the way of explanation for it. Thankfully, most of it is pretty straight-forward. There are a few things that the script has to manage to make the it work - a text buffer for the data, a viewer (window), and the syntax highlighting component. For the view, there are a few handy functions already built in so you won't have to create them - undos, the syntax highlighting, line numbering, markers, and bracket highlighting.

tagged: gtksourceview editor syntax highlight undo marker bracket gtksourceview editor syntax highlight undo marker bracket

Link:

PHP-GTK Community Site:
Using GtkSourceview to build a php editor with syntax highlighting
Dec 19, 2006 @ 08:34:00

There's a new tutorial posted on the PHP-GTK Community site today - a quick one showing how to use GtkSourceview to create a simple PHP editor with syntax highlighting.

This widget is nearly usable as a real php-gtk IDE. It extends GtkSourceView widget and internally manages both a text buffer and language object classes.

They provide the code, but not too much in the way of explanation for it. Thankfully, most of it is pretty straight-forward. There are a few things that the script has to manage to make the it work - a text buffer for the data, a viewer (window), and the syntax highlighting component. For the view, there are a few handy functions already built in so you won't have to create them - undos, the syntax highlighting, line numbering, markers, and bracket highlighting.

tagged: gtksourceview editor syntax highlight undo marker bracket gtksourceview editor syntax highlight undo marker bracket

Link: