News Feed
Sections




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

Gareth Heyes:
Tweetable PHP-Non Alpha
December 13, 2012 @ 09:40:25

Gareth Heyes has a new post that shares some of his efforts to write "non-alpha PHP", using characters other than the alpha-numeric ones to write executable PHP scripts. In his case, this involves a lot of pluses, underscores and square brackets.

I started to try and break the 10 charset limit of PHP non-alpha after @InsertScript showed me that PHP Dev supports [] syntax for arrays. I wondered if it would be possible to break the limit within production PHP. At first I thought you could but then after some testing I found that there was no way to concat without "." and no way to call a string as a function without $ and =. However since I got into PHP Non-alpha again I thought why not try and improve it and make the code tweetable.

He works through the whole process of his discovery - starting with the creation of a non-alpha version of "0" (zero), moving into letter creation and finally all the way up to a full word..."assert". The result is tweetable code that echoes that string and contains more symbols than letters. If you're interested in more of this non-alpha kind of coding, check out some of the other posts on his blog.

0 comments voice your opinion now!
nonalpha code tweet plus underscore squarebracket


blog comments powered by Disqus

Similar Posts

DZone.com: Automated code reviews for PHP

PHPMaster.com: Practical Code Refactoring, Part 2 - Readability

PHPMaster.com: Practical Refactoring, Part 1 - What is Good Code?

Slava Vishnyakov: PHP the Nice Way (Ever-evolving Huge Retailer Website Story)

PHPFreaks.com: 10 Ways to Avoid Writing Crappy Code


Community Events





Don't see your event here?
Let us know!


opinion tool install introduction release language framework library interview package podcast symfony laravel composer series update version community security voicesoftheelephpant

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework