this post was submitted on 15 Jan 2025
91 points (98.9% liked)

Programmer Humor

37300 readers
70 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 6 years ago
MODERATORS
 

A small collection of WTF code snippets sorted by language.

you are viewing a single comment's thread
view the rest of the comments
[–] lord_ryvan@ttrpg.network 1 points 5 months ago

Yeah, just check the PHP section!

My favourite is

var_dump(true == 'bob') . PHP_EOL;   // bool(true)
var_dump('bob' == 0) . PHP_EOL;   // bool(true)
var_dump(true == 0) . PHP_EOL;   // bool(false)