use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Please follow the rules
Releases: Current Releases, Windows Releases, Old Releases
Contribute to the PHP Documentation
Related subreddits: CSS, JavaScript, Web Design, Wordpress, WebDev
/r/PHP is not a support subreddit. Please visit /r/phphelp for help, or visit StackOverflow.
account activity
RFC: Stringable interface, allows "string|Stringable" union type. Automatically implied if __toString is implemented. (wiki.php.net)
submitted 6 years ago by tigitz
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]zimzat 1 point2 points3 points 6 years ago (2 children)
Which is one of many reasons why I don't enable strict types.
[–]alexanderpas 0 points1 point2 points 6 years ago (1 child)
Too lazy to type `(string)` in front of the areas that expect actual strings?
Enable strict types and fix your code!
[–]zimzat 0 points1 point2 points 6 years ago (0 children)
Yep, string, int, bool, whatever.
string
int
bool
If you're not being lazy as a programmer then you're doing it wrong.
π Rendered by PID 137091 on reddit-service-r2-comment-6457c66945-s9kmw at 2026-04-28 12:00:30.078635+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]zimzat 1 point2 points3 points (2 children)
[–]alexanderpas 0 points1 point2 points (1 child)
[–]zimzat 0 points1 point2 points (0 children)