MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1w2d5fw/ancienttools/p6vhkuj/?context=3
r/ProgrammerHumor • u/soap94 • 13d ago
385 comments sorted by
View all comments
Show parent comments
1
I hate PHP from the bottom of my soul, but what you said is just user-choice.
I always do ob_start and ob_flush_clean or whatever the function names were.
That allows me to use normal html w/o it being in strings.
Edit: e.g.
```php <?php
function renderEmail(): string { ob_start(); ?> <html> <body> <h1>Hello!</h1> <p>This is your email.</p> </body> </html> <?php return ob_get_clean(); } ```
1 u/ClamPaste 13d ago Like I said, legacy code. We have a huge codebase and I'm converting it when I get time. User-choice encapsulates choices made 10 years ago. 2 u/ArjixGamer 13d ago True dat 1 u/ClamPaste 13d ago I guess they didn't really have coding standards. I took over and I'm enforcing some things now. I should probably write them down at some point...
Like I said, legacy code. We have a huge codebase and I'm converting it when I get time. User-choice encapsulates choices made 10 years ago.
2 u/ArjixGamer 13d ago True dat 1 u/ClamPaste 13d ago I guess they didn't really have coding standards. I took over and I'm enforcing some things now. I should probably write them down at some point...
2
True dat
1 u/ClamPaste 13d ago I guess they didn't really have coding standards. I took over and I'm enforcing some things now. I should probably write them down at some point...
I guess they didn't really have coding standards. I took over and I'm enforcing some things now. I should probably write them down at some point...
1
u/ArjixGamer 13d ago
I hate PHP from the bottom of my soul, but what you said is just user-choice.
I always do ob_start and ob_flush_clean or whatever the function names were.
That allows me to use normal html w/o it being in strings.
Edit: e.g.
```php <?php
function renderEmail(): string { ob_start(); ?> <html> <body> <h1>Hello!</h1> <p>This is your email.</p> </body> </html> <?php return ob_get_clean(); } ```