Overview of PHP shorthand
- by James Simpson
I've been programming in PHP for years now, but I've never learned how to use any shorthand. I come across it from time to time in code and have a hard time reading it, so I'd like to learn the different shorthand that exists for the language sot hat I can read it and start saving time/lines by using it, but I can't seem to find a comprehensive overview of all of the shorthand.
A Google search pretty much exclusively shows the shorthand for if/else statements, but I know there must be more than just that.
By shorthand, I am talking about stuff like:
($var) ? true : false;