210 – 17 group student Yuldoshev Ubaydullo’s final control work from web application development


Download 0.83 Mb.
bet1/2
Sana24.06.2020
Hajmi0.83 Mb.
#121332
  1   2
Bog'liq
Yakuniy WEB


210 – 17 group student Yuldoshev Ubaydullo’s

final control work from web application development

Option 24



  1. Comparison operations in PHP

  2. Permits related to administration “SHUTDOWN”

  3. Reworking processing sequential data entry in Yii

Answers:

  1. Comparison operations in PHP

In PHP, comparison operators take simple values (numbers or strings) as arguments and evaluate to either TRUE or FALSE.

Here is a list of comparison operators.



Operator

Name

Example

Result

= =

Equal

$x == $y

TRUE if $x is exactly equal to $y

= = =

Identical

$x === $y

TRUE if $x is exactly equal to $y, and they are of the same type.

!=

Not equal

$x != $y

TRUE if $x is exactly not equal to $y.

<>

Not equal

$x <> $y

TRUE if $x is exactly not equal to $y.

!==

Not identical

$x !== $y

TRUE if $x is not equal to $y, or they are not of the same type. 

<

Less than

$x < $y

TRUE if $x (left-hand argument) is strictly less than $y (right-hand argument).

>

Greater than

$x > $y

TRUE if $x (left hand argument)  is strictly greater than $y (right hand argument).

<=

Less than or equal to

$x <= $y

TRUE if $x (left hand argument) is less than or equal to $y (right hand argument).

>=

Greater than or equal to

$x >= $y

TRUE if $x is greater than or equal to $y.



Comparison operators allow you to compare two values.

These operators test two values against each other, and if they relate correctly, the test returns true.

If the relationship specified by the test is incorrect, the return value is false. All comparison operators take two values for input.



We also can compare String in PhP



During any sort of programming you will always get situations where you need to compare values with each other, if the values are boolean or integers then the comparison is simple. But if you want to compare strings or parts of strings then there can be more to the comparison such as case of the string you are comparing. In this tutorial we are going to look at all the different ways you can compare strings in PHP using a number of built in PHP functions.

Download 0.83 Mb.

Do'stlaringiz bilan baham:
  1   2




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling