News Feed
Sections




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

Ivo Jansch's Blog:
System.out.print in PHP
March 09, 2007 @ 07:12:44

Ivo Jansch discovered something interesting by way of an applicant's resume - a hidden "trick" that PHP pulls on the user when they try to use a Java-like syntax with System.

So yesterday I was reviewing a code sample that a job applicant had written during a test and I encountered the following line of code: It's not hard to guess what his background was :), but I was initially stunned that this actually works in php.

After a little investigating (and ruling out the Java Bridge), Ivo found that the line was being interpreted literally and was just being handled as a string instead of a constant. He gives two other examples to help with clarification.

1 comment voice your opinion now!
constant string java bridge notice constant string java bridge notice


blog comments powered by Disqus

Similar Posts

Harry Fuecks' Blog: Using OpenSSL, RSA and RC4 to exchange encrypted data from PHP to Java

Nikita Popov's Blog: Disproving the Single Quotes Performance Myth

PHPClasses.org: Lately in PHP, Episode 28 - Should PHP be Copying the Java features and practices?

Ant Phillips' Blog: Integrating SAP NetWeaver in Zero PHP

Lukas Smith's Blog: Why bother?


Community Events





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


opinion list language configure voicesoftheelephpant podcast api symfony series laravel community version unittest conference interview threedevsandamaybe framework introduction release composer

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