Menu
sudo make me a sandwich.
Home
Hot
Random
Search
Browse
AI
AWS
Agile
Algorithms
Android
Apple
Azure
Backend
Bash
C++
Cloud
All Categories
HTTP 418: I'm a teapot
The server identifies as a teapot now and is on a tea break, brb
HTTP 418: I'm a teapot
The server identifies as a teapot now and is on a tea break, brb
String-to-int Memes
Posts tagged with String-to-int
String To Integer Conversion
php
Programming
Backend
Webdev
21 days ago
63.8M views
0 shares
When someone discovers type casting exists but their brain refuses to accept it. Instead of using a simple intval() or (int) , this developer decided to manually map every possible string value to its integer equivalent. It's like reinventing the wheel, except the wheel is square and made of sadness. Best part? They're pulling from $_POST , so they're probably expecting user input. Can't wait to see what happens when someone enters "90" or literally any value not in their hardcoded if-statement pyramid. Spoiler: $transamount stays undefined and the app explodes. This is what happens when you learn programming from a 2003 PHP tutorial and never question anything.
Today's picks
50PCS Programming Developer Stickers for Laptop Computer Water Bottles Scrapbook Luggage Phone Case Skateboard Journal Notebook,Coders Programmers Hackers Waterproof Decals for Teenagers Adults
Affiliate
$6.99
The only programmer twitter needs is John Carmack
StackOverflow
185.8K views
2 years ago
Hypothetically, If You Were Pivoting To Adult Games, What Would You Name Your Studio? I'm Leaning Toward One-Handed Games ๐
Gamedev
338.1K views
7 months ago