Halloween == Christmas


Oct 31 == Dec 25

It’s an octal joke. John Lim over at PHP Everywhere had to chase a bug report because in PHP tossing a zero in front makes your number octal, the way 0x makes you hexadecimal.

Octalpussy | PHP Everywhere

Octal notation can be useful for things like filemasks, but I can’t think of many other practical (non-bit fiddling) uses, so school me on it please.

A common PHP mistake is forgetting the chmod() function wants an octal number as the file mode. I wrote about this and some other fun screwups when I worked for Zend in an article called PHP Gotchas, which could really use a part two..


About John Herren

John Herren is a developer and technical consultant with focus on web applications. He currently serves as Director of Development for Primetime US, the company behind the hit movie and book The Secet. John was formerly staff writer and developer community evangelist for Zend Technologies. Along with founding neat experiments like TagCloud.com, John is an active member in the mashup community, working with API providers and speaking at conferences. He is a published author of Linux certification study material. John enjoys using open source software like PHP and Ruby on Rails to bend the web into exciting new chimeras of hyperlinked goodness. View all posts by John Herren

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: