triangle puzzle in php

autoload
Release: 2023-04-09 19:40:01
Original
2850 people have browsed it

Equality operators and congruence operators are both comparison operators and binary operators. The return values ​​are true and false.

1. Equality operator (==): Only compare the values ​​on both sides of ==.

<?php
 $a="幸运女神向我走来";
 $b="噩运女神离我远去";
    if(0==false)
      {
        echo $a."<br>";
      }else
            echo $b."<br>";
 //输出结果:幸运女神向我走来   
?>
Copy after login

2. Congruence operator (===): Not only compares the values ​​on both sides of ===, but also compares the data types on both sides of ===.

<?php
 $a="幸运女神向我走来";
 $b="噩运女神离我远去";

if(0===false)
{
    echo $a."<br>";
}else
    echo $b."<br>";
    //输出结果:噩运女神离我远去
?>
Copy after login

The equality operator and the congruence operator are very similar to similar triangles and congruent triangles in junior high school mathematics. The congruence operator returns true, so the equality operator must also return true. The opposite is not true.

Recommended: php tutorial,php video tutorial

The above is the detailed content of triangle puzzle in php. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template