3 ms·
I also scored 14/15 - got PHP wrong I thought it was Perl which is slightly embarrassing as I've never used PHP but I have used Perl.
by arethuza 9y ago
I also scored 14/15 - got PHP wrong I thought it was Perl which is slightly embarrassing as I've never used PHP but I have used Perl.
- netvarun 9y agoCan concur. I managed to get all correct, but that one question that almost tripped me was the PHP question. As an ex-perl dev, (looks at self) shrugs in disbelief!
- khedoros1 9y agoI did that too, and in the same situation (although I got more wrong).
- twic 9y agoDitto. I'm positive that code would be valid Perl with the right libraries. Which isn't saying much.
- dunham 9y agoSame here, because I knew they intersected and presumed it was a trick question. Technically, I believe it is neither valid perl nor PHP because it's missing an opening brace on one of the if statements.
- sethrin 9y agoPHP lets you skip using curly braces for conditionals. I've seen real-world code which used this style only once, and it was about as bad as you'd expect.
- dunham 9y agoYeah, I suspected that, but it looked like there was a close brace and no open brace. (I only noticed because I was specifically looking at the braces to try to determine if it was PHP.)
- rmrfrmrf 9y agoThe lovely globals (e.g. `$_GET`) are what give PHP away.
- nameless912 9y agoPHP and Perl are basically like Spanish and Italian when it comes to syntax. Both can more or less interoperate with the assistance of lots of hand gestures and facial expressions.