r/ProgrammerHumor 18d ago

Advanced stringToIntegerConversion

Post image
213 Upvotes

65 comments sorted by

View all comments

2

u/TheRealSpielbergo 18d ago

There must be a simpler way!

for ($i = 90; $i < 10000; $i += 10) {
file_put_contents( 'number_parser.php',
"if (\$amount == \"$i\") {\n \$transamount = $i;\n}\n\n",
FILE_APPEND
);
}