What are unary operators and binary operators?
What is a unary operator?
Unary operator refers to an operator that requires one variable for operation, that is, there is only one operand in the operation, also called unary operator, among which there are logical NOT operators: !, press Bit negation operator: ~, increment and decrement operators: , --, etc.
Logical NOT operator [!], bitwise negation operator [~], increment and decrement operator [ , --], negative sign operator [-], type conversion operator [( Type)], pointer operator and address operator [* and &], length operator [sizeof]
What is a binary operator?
An operator that requires two variables for an operation is called a binary operator, or an operator that requires the number of operands to be 2 is called a binary operator.
Elementary operators
Subscript operator [[]], component operator pointing to structure member operator [->], structure member operation Symbol [.]
Arithmetic operator
Multiplication operator [*], division operator [/], remainder operator [%], addition operator 【】, subtraction operator【-】
relational operator
equal operator【==】, not equal operator【!=】, relational operator 【< > <= >= 】
Logical operator
Logical AND operator【&&】, Logical OR operator【||】, Logical NOT operator [! 】
Bitwise Operator
Bitwise AND operator [&], Bitwise XOR operator [^], Bitwise OR operator [|], Left shift operator [<<], right shift operator [>>]
Assignment operator
Assignment operator[= = -= *= /= %= >>= <<= &= |= ^=】
Comma operator
Comma operator【,】
The above is the detailed content of What are unary operators and binary operators?. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)
