php expression, php regular expression_PHP tutorial

WBOY
Release: 2016-07-12 08:51:34
Original
840 people have browsed it

php expression, php regular expression

Expression is an important concept in PHP. An expression can be understood as "anything with value". In this tutorial, when it comes to the syntax of expressions, we use "expr" to represent expressions.

The following is an expression:

$x > $y;
Copy after login

In the above example, when the value of $x is greater than $y, the expression value is TRUE, otherwise it is FALSE.

We often determine our next step logic by judging the value of an expression (including specific numerical values ​​and Boolean values), such as the following example:

<?php
if ($x > $y) {
     echo "x > y";
}
?>
Copy after login

This example uses if logical judgment. The judgment condition is the $x > $y expression in parentheses. If $x > $y is true (TRUE), then the words "y > x" will be output. Of course, the actual situation is much more complicated.

Expressions are widely used in our PHP programming.

Original address: http://www.manongjc.com/php/php_expressions.html

php related reading:

php uses strcmp() function to compare two strings (case sensitive)

php strncmp function compares two strings case-sensitively

php strcoll() compares two strings according to local information settings

php strcspn find search string

php strspn() function gets the number of occurrences of a specified string in another string

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1130051.htmlTechArticlephp expression, php regular expression expression is an important concept in PHP, the expression can be understood as Anything of value. When it comes to expression syntax in this tutorial, we start with...
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!