Recommended Answers
Jump to PostAnswer is 8 not 6
Jump to PostThis is the code syntax tree from http://phpfiddle.org/
array( 0: Expr_Assign( var: Expr_Variable( name: x ) expr: Scalar_LNumber( value: 1 ) ) 1: Stmt_Echo( exprs: array( 0: Expr_Plus( left: Expr_Plus( …
Jump to PostI can get 4 different answers every time, heh heh!
Jump to Postaccording to the manual: operators precedence
it has an 'Undefined order of evaluation'
and may 'change between versions of PHP or depending on the surrounding code'
All 13 Replies





We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.