<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Comparison operators Archives - Artificial Intelligence</title>
	<atom:link href="https://www.aiuniverse.xyz/tag/comparison-operators/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.aiuniverse.xyz/tag/comparison-operators/</link>
	<description>Exploring the universe of Intelligence</description>
	<lastBuildDate>Sat, 15 Apr 2023 10:16:39 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>PHP Operators and its types?</title>
		<link>https://www.aiuniverse.xyz/php-operators-and-its-types/</link>
					<comments>https://www.aiuniverse.xyz/php-operators-and-its-types/#respond</comments>
		
		<dc:creator><![CDATA[Maruti Kr.]]></dc:creator>
		<pubDate>Sat, 15 Apr 2023 10:16:38 +0000</pubDate>
				<category><![CDATA[PHP Tutorials]]></category>
		<category><![CDATA[Arithmetic operator in PHP]]></category>
		<category><![CDATA[Assignment operator in PHP]]></category>
		<category><![CDATA[Bitwise operator]]></category>
		<category><![CDATA[Comparison operators]]></category>
		<category><![CDATA[Increment and Decrement operator]]></category>
		<category><![CDATA[Logical operator]]></category>
		<category><![CDATA[PHP Operators]]></category>
		<category><![CDATA[PHP Operators and its types]]></category>
		<guid isPermaLink="false">https://www.aiuniverse.xyz/?p=16424</guid>

					<description><![CDATA[<p>In PHP, Operators are special symbols that are used to perform operations on variables and values. PHP has various types of operators- Arithmetic operator in PHP: Arithmetic <a class="read-more-link" href="https://www.aiuniverse.xyz/php-operators-and-its-types/">Read More</a></p>
<p>The post <a href="https://www.aiuniverse.xyz/php-operators-and-its-types/">PHP Operators and its types?</a> appeared first on <a href="https://www.aiuniverse.xyz">Artificial Intelligence</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<div class="wp-block-media-text alignwide is-stacked-on-mobile"><figure class="wp-block-media-text__media"><img fetchpriority="high" decoding="async" width="1024" height="576" src="https://www.aiuniverse.xyz/wp-content/uploads/2023/04/php-operators-1024x576.webp" alt="" class="wp-image-16470 size-full" srcset="https://www.aiuniverse.xyz/wp-content/uploads/2023/04/php-operators-1024x576.webp 1024w, https://www.aiuniverse.xyz/wp-content/uploads/2023/04/php-operators-300x169.webp 300w, https://www.aiuniverse.xyz/wp-content/uploads/2023/04/php-operators-768x432.webp 768w, https://www.aiuniverse.xyz/wp-content/uploads/2023/04/php-operators.webp 1200w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure><div class="wp-block-media-text__content">
<p>In PHP, Operators are special symbols that are used to perform operations on variables and values. </p>



<p>PHP has various types of operators-</p>
</div></div>



<div class="wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile"><div class="wp-block-media-text__content">
<ol class="wp-block-list">
<li>Arithmetic operator</li>



<li>Comparison operator</li>



<li>Logical operator</li>



<li>Assignment operator</li>



<li>Increment and Decrement operator</li>



<li>Bitwise operator</li>
</ol>
</div><figure class="wp-block-media-text__media"><img decoding="async" width="1024" height="579" src="https://www.aiuniverse.xyz/wp-content/uploads/2023/04/PHP-Operators-Expressions-1024x579.webp" alt="" class="wp-image-16471 size-full" srcset="https://www.aiuniverse.xyz/wp-content/uploads/2023/04/PHP-Operators-Expressions-1024x579.webp 1024w, https://www.aiuniverse.xyz/wp-content/uploads/2023/04/PHP-Operators-Expressions-300x170.webp 300w, https://www.aiuniverse.xyz/wp-content/uploads/2023/04/PHP-Operators-Expressions-768x435.webp 768w, https://www.aiuniverse.xyz/wp-content/uploads/2023/04/PHP-Operators-Expressions.webp 1200w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure></div>



<h2 class="wp-block-heading">Arithmetic operator in PHP:</h2>



<p>Arithmetic operators Example like:  +, -, *, /, % (modulus), ** (exponentiation)</p>



<figure class="wp-block-table"><table><tbody><tr><th>Operator</th><th>Name</th><th>Example</th><th>Explanation</th></tr><tr><td>+</td><td>Addition</td><td>$a + $b</td><td>Sum of operands</td></tr><tr><td>&#8211;</td><td>Subtraction</td><td>$a &#8211; $b</td><td>Difference of operands</td></tr><tr><td>*</td><td>Multiplication</td><td>$a * $b</td><td>Product of operands</td></tr><tr><td>/</td><td>Division</td><td>$a / $b</td><td>Quotient of operands</td></tr><tr><td>%</td><td>Modulus</td><td>$a % $b</td><td>Remainder of operands</td></tr><tr><td>**</td><td>Exponentiation</td><td>$a ** $b</td><td>$a raised to the power $b</td></tr></tbody></table></figure>



<h2 class="wp-block-heading">Assignment operator in PHP:</h2>



<p>Assignment operators: =, +=, -=, *=, /=, %=, .= (concatenation assignment)</p>



<figure class="wp-block-table"><table><tbody><tr><th>Operator</th><th>Name</th><th>Example</th><th>Explanation</th></tr><tr><td>=</td><td>Assign</td><td>$a = $b</td><td>The value of right operand is assigned to the left operand.</td></tr><tr><td>+=</td><td>Add then Assign</td><td>$a += $b</td><td>Addition same as $a = $a + $b</td></tr><tr><td>-=</td><td>Subtract then Assign</td><td>$a -= $b</td><td>Subtraction same as $a = $a &#8211; $b</td></tr><tr><td>*=</td><td>Multiply then Assign</td><td>$a *= $b</td><td>Multiplication same as $a = $a * $b</td></tr><tr><td>/=</td><td>Divide then Assign<br>(quotient)</td><td>$a /= $b</td><td>Find quotient same as $a = $a / $b</td></tr><tr><td>%=</td><td>Divide then Assign<br>(remainder)</td><td>$a %= $b</td><td>Find remainder same as $a = $a % $b</td></tr></tbody></table></figure>



<h2 class="wp-block-heading">Comparison operators:</h2>



<p>Comparison operators: ==, === (identical), !=, !== (not identical), &lt;, >, &lt;=, >=</p>



<figure class="wp-block-table"><table><tbody><tr><th>Operator</th><th>Name</th><th>Example</th><th>Explanation</th></tr><tr><td>==</td><td>Equal</td><td>$a == $b</td><td>Return TRUE if $a is equal to $b</td></tr><tr><td>===</td><td>Identical</td><td>$a === $b</td><td>Return TRUE if $a is equal to $b, and they are of same data type</td></tr><tr><td>!==</td><td>Not identical</td><td>$a !== $b</td><td>Return TRUE if $a is not equal to $b, and they are not of same data type</td></tr><tr><td>!=</td><td>Not equal</td><td>$a != $b</td><td>Return TRUE if $a is not equal to $b</td></tr><tr><td>&lt;&gt;</td><td>Not equal</td><td>$a &lt;&gt; $b</td><td>Return TRUE if $a is not equal to $b</td></tr><tr><td>&lt;</td><td>Less than</td><td>$a &lt; $b</td><td>Return TRUE if $a is less than $b</td></tr><tr><td>&gt;</td><td>Greater than</td><td>$a &gt; $b</td><td>Return TRUE if $a is greater than $b</td></tr><tr><td>&lt;=</td><td>Less than or equal to</td><td>$a &lt;= $b</td><td>Return TRUE if $a is less than or equal $b</td></tr><tr><td>&gt;=</td><td>Greater than or equal to</td><td>$a &gt;= $b</td><td>Return TRUE if $a is greater than or equal $b</td></tr><tr><td>&lt;=&gt;</td><td>Spaceship</td><td>$a &lt;=&gt;$b</td><td>Return -1 if $a is less than $b<br>Return 0 if $a is equal $b<br>Return 1 if $a is greater than $b</td></tr></tbody></table></figure>



<h2 class="wp-block-heading">Logical operator:</h2>



<p>Logical operators: &amp;&amp; (and), || (or), ! (not)</p>



<figure class="wp-block-table"><table><tbody><tr><th>Operator</th><th>Name</th><th>Example</th><th>Explanation</th></tr><tr><td>and</td><td>And</td><td>$a and $b</td><td>Return TRUE if both $a and $b are true</td></tr><tr><td>Or</td><td>Or</td><td>$a or $b</td><td>Return TRUE if either $a or $b is true</td></tr><tr><td>xor</td><td>Xor</td><td>$a xor $b</td><td>Return TRUE if either $ or $b is true but not both</td></tr><tr><td>!</td><td>Not</td><td>! $a</td><td>Return TRUE if $a is not true</td></tr><tr><td>&amp;&amp;</td><td>And</td><td>$a &amp;&amp; $b</td><td>Return TRUE if either $a and $b are true</td></tr><tr><td>||</td><td>Or</td><td>$a || $b</td><td>Return TRUE if either $a or $b is true</td></tr></tbody></table></figure>



<h2 class="wp-block-heading">Increment and Decrement operator:</h2>



<p>Increment/Decrement operators: ++ (increment), &#8212; (decrement)</p>



<figure class="wp-block-table"><table><tbody><tr><td>Name</td><td>Operator</td></tr><tr><td>Pre-increment</td><td>++$x</td></tr><tr><td>Post-Increment</td><td>$x- &#8211;    </td></tr><tr><td>Pre-decrement</td><td>–$x</td></tr><tr><td>Post-decrement</td><td>$x- &#8211;</td></tr></tbody></table></figure>



<h2 class="wp-block-heading">Bitwise operator:</h2>



<p>Bitwise operators: &amp; (and), | (or), ^ (xor), ~ (not), &lt;&lt; (left shift), >> (right shift)</p>



<figure class="wp-block-table"><table><tbody><tr><th>Operator</th><th>Name</th><th>Example</th><th>Explanation</th></tr><tr><td>&amp;</td><td>And</td><td>$a &amp; $b</td><td>Bits that are 1 in both $a and $b are set to 1, otherwise 0.</td></tr><tr><td>|</td><td>Or (Inclusive or)</td><td>$a | $b</td><td>Bits that are 1 in either $a or $b are set to 1</td></tr><tr><td>^</td><td>Xor (Exclusive or)</td><td>$a ^ $b</td><td>Bits that are 1 in either $a or $b are set to 0.</td></tr><tr><td>~</td><td>Not</td><td>~$a</td><td>Bits that are 1 set to 0 and bits that are 0 are set to 1</td></tr><tr><td>&lt;&lt;</td><td>Shift left</td><td>$a &lt;&lt; $b</td><td>Left shift the bits of operand $a $b steps</td></tr><tr><td>&gt;&gt;</td><td>Shift right</td><td>$a &gt;&gt; $b</td><td>Right shift the bits of $a operand by $b number of places</td></tr></tbody></table></figure>
<p>The post <a href="https://www.aiuniverse.xyz/php-operators-and-its-types/">PHP Operators and its types?</a> appeared first on <a href="https://www.aiuniverse.xyz">Artificial Intelligence</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.aiuniverse.xyz/php-operators-and-its-types/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
