Nate Weiner

This is an old archived post from my former blog The Idea Shower. It's where I cataloged my product explorations and releases, one of which ultimately became Pocket.

This post was published back in 2008. It may not function as originally intended or may be missing images.

Cleaner Print Command in PHP

January 22, 2008

Stumbled upon this by accident and I haven't been able to find anything in the PHP documentation because you can't search for non-alpha characters, but this find has cleaned up my code a ton.

<?php print 'Hello World'; ?>

Works the same as:

<?= 'Hello World' ?>

I'm using PHP 5, so I don't know if this works in previous versions.