Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@h3rrcrypt099 I like it but I'm still unsure if it should be used as it could make something harder to understand.
-
It's a decent substitute for if expressions like those of Rust, although the flow of values is less clear.
-
@Polymorphism Yup. That's why one should use it with care (about the person who is gonna read that code in the future)
-
@SuspiciousBug I've just looked up `calc` on the PHP docs and I can't find a function named that :/
-
@Polymorphism in PHP you can execute commands with ticks. On Windows,
`calc`;
will open the calculator app! 😊😞😔 -
@SuspiciousBug Well I didn't know that either lol. That's crazy.
I'm not on Windows so I ran `php --interactive` to test `echo `ls`;` in the REPL and sure enough I get the contents of the current dir 😅.
TIL: PHP if statements don't have block scope.
I didn't know this, was surprised and thought "well, huh".
random