Operators in PHP

Advertisements

Print Output in PHP For Loop in PHP

Operators in PHP

Operators is a symbol which is used to perform operations on operands. Here you can see very simple example of operator

Example

$num=4+5;

In the above example, + is the binary + operator, 4 and 5 are operands and $num is variable.

PHP divides the operators in the following groups:

  • Arithmetic Operators
  • Comparison Operators
  • Bitwise Operators
  • Logical Operators
  • String Operators
  • Incrementing/Decrementing Operators
  • Array Operators
  • Assignment Operators

Operators in php

OperatorsAdditional InformationAssociativity
clone newclone and newnon-associative
[array()left
**arithmeticright
++ -- ~ (int) (float) (string) (array) (object) (bool) @increment/decrement and typesright
instanceoftypesnon-associative
!logical (negation)right
* / %arithmeticleft
+ - .arithmetic and string concatenationleft
<< >>bitwise (shift)left
< <= > >=comparisonnon-associative
== != === !== <>comparisonnon-associative
&bitwise ANDleft
^bitwise XORleft
|bitwise ORleft
&&logical ANDleft
||logical ORleft
?:ternaryleft
= += -= *= **= /= .= %= &= |= ^= <<= >>= =>assignmentright
andlogicalleft
xorlogicalleft
orlogicalleft
,many uses (comma)left

Print Output in PHP For Loop in PHP

Advertisements

Buy This Ad Space @$20 per Month, Ad Size 600X200 Contact on: hitesh.xc@gmail.com or 8076671483

Pure VPN Privide Lowest Price VPN Just @ $1.65. Per Month with Non Detected IP Lowest Price Non Detected IP VPN

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

Download Projects

Advertisements


Buy Websites 9999595223

Buy Fresh and Payment Receive Media.net Account with Website. Contact on: hitesh.xc@gmail.com or 9999595223 Try this Keyword C++ Programs