The RedMonk Programming Language Rankings: January 2018

echo $x+++$x++; = 11 echo $x; = 7

( $x++ ) + ( $x++ )

$x becomes ( 5 ) + ( 6 ) = 11 echo out. The last X ++ only gets evaluated after the expression. So the next line $x will output 7. Its very basic knowing when your expression gets evaluated because if you do not know that, your code can have bugs.

Some people comments that they will hightail it out when they get a question like that. I think its for the best because if you can not figure that out... your in the wrong job.

And as i wrote here also, it was not about getting the number correct but seeing the ability to problem solve. Simply trying to write out the code to a more clearly statement was already a passing grade on that question. I am not evil ;)

/r/programming Thread Parent Link - redmonk.com