• 实例首页
  • 自学教程
  • IT工具箱
xxxxxxxxxx
 
1
<!DOCTYPE html>
2
<html>
3
​
4
<head>
5
<meta charset="utf-8">
6
<title>PHP 运算符优先级 实例 - 自学教程(runoops.com)</title>
7
<head>
8
<body>
9
​
10
<?php
11
// 括号优先运算
12
 
13
$a = 1;
14
$b = 2;
15
$c = 3;
16
$d = $a + $b * $c;
17
echo $d;
18
echo '<br />';
19
$e = ($a + $b) * $c;  // 使用括号
20
echo $e;
21
​
22
?>
23
​
24
</body>
25
​
26
</html>

© 2023 自学教程   runoops.com All Rights Reserved. 备案号:闽ICP备19010956号-1