The code you showed is called a ternary operator... it's the shortcut for if {} else {} statement https://stitcher.io/blog/shorthand-comparisons-in-php