Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP PHP Basics (Retired) PHP Operators Operators

Srinath Kattula
Srinath Kattula
1,574 Points

Operators.

Correct me if I am wrong but this is what I was known earlier. Unary operator means that it has to have one operand . Eg: ++ operator which only requires one operand.

Binary operator has to have 2 operands Eg + , a + b here + has a and b as operands.

This video tells that binary operator is that it has 2 symbols like > = which , to my knowledge, sounded otherwise. Please correct me if I am wrong. Thanks

2 Answers

Layla Cecil
Layla Cecil
7,421 Points

This really should be changed. It has everything to do with the amount of operands, nothing to do with how many characters it takes to create the syntax for an operator. How is it that this is still up?

Hi Srinath,

This has come up before, please see a similar thread on Operators with a good explanation by Stone Preston.

Cheers