Jump to content

Recommended Posts

Posted

Yoda conditions I've seen before. They're awesome, especially for PHP and other C-style languages where accidentally dropping off a comparison operator can be an issue.

For example: if (x = 3) {

will work, whereas: if (3 = x) {

will result in an error.

 

Truly lifesaving.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...