What is Operator? how many opeartor used in the php

Operator is a one of function.It used for perform various functions.Types of operator:
arithmetic
Mathematics
Unary
Bitwise
Relational
etc..........
 
Operator is one kinda of sign which is used to doing an appropriate arithmetic and mathematics operation. There are few operators is given below

Arithmetic
Bit-wise
Incremental / decremental
Logical
Unary
Comparison.
 
What is Operator? Simple answer can be given using expression 4 + 5 is equal to 9. Here 4 and 5 are called operands and + is called operator. PHP language supports following type of operators.

Arithmetic Operators

Comparision Operators

Logical (or Relational) Operators

Assignment Operators

Conditional (or ternary) Operators
 
An operator is something that takes one or more values (or expressions, in programming jargon) and yields another value (so that the construction itself becomes an expression).

Operators can be grouped according to the number of values they take. Unary operators take only one value, for example ! (the logical not operator) or ++ (the increment operator). Binary operators take two values, such as the familiar arithmetical operators + (plus) and - (minus), and the majority of PHP operators fall into this category. Finally, there is a single ternary operator, ? :, which takes three values; this is usually referred to simply as "the ternary operator" (although it could perhaps more properly be called the conditional operator).

A full list of PHP operators follows in the section Operator Precedence. The section also explains operator precedence and associativity, which govern exactly how expressions containing several different operators are evaluated.
 
An operator is something that takes one or more values (or expressions, in programming jargon) and yields another value (so that the construction itself becomes an expression).

Operators can be grouped according to the number of values they take. Unary operators take only one value, for example ! (the logical not operator) or ++ (the increment operator). Binary operators take two values, such as the familiar arithmetical operators + (plus) and - (minus), and the majority of PHP operators fall into this category. Finally, there is a single ternary operator, ? :, which takes three values; this is usually referred to simply as "the ternary operator" (although it could perhaps more properly be called the conditional operator).
 
PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language. Operators in:
1.Arithmetic operators
2.Assignment operators
3.Comparison operators
4.Increment/Decrement operators
5.Logical operators
6.String operators
7.Array operators
 
All php operators are divided in 7 groups generally.
1. Arithmetic Operators - These are use for arithmetic operation like Addition, Subtraction, Multiplication, Division, Modulus, Exponentiation.
2. Comparison Operators - They use for comparing value of variables. like Equal, grater than, not equal, identical etc.
3. Assignment Operators - It is basically "="
4. Increment / decrement Operators - it is use for increment or decrement of variable value.
5. Logical Operators - They are use for combine conditional statement. like and, or , &&, || , !
6. String Operators - "." and ".=" callled as string oprators which used for Concatenation.
7. Array Operators - For comparing array like Union, Equality, Identity, Inequality, Inequality.

There are some other array too used in php as bitwise, error control, execution, etc.
 
Back
Top