abstract:<?php$f = 20;$thief = '算式';function demo1(){ $a = 10; $b = 20; global $f; global $thief; $c = $a*$b+$f; return $thief.':'.$a.'*'.$b.'+
<?php
$f = 20;
$thief = '算式';
function demo1()
{
$a = 10;
$b = 20;
global $f;
global $thief;
$c = $a*$b+$f;
return $thief.':'.$a.'*'.$b.'+'.$f.'='.$c;
}
echo demo1();
echo '<hr>';
$name = '小龙女';
$age = 22;
$hunfou0 = true;
$hunfou1 = false;
echo gettype($hunfou0),'<br>';
echo gettype($hunfou1),'<br>';
echo '<hr>';
echo '姓名:'.$name.'<br>年龄:'.$age.'<br>婚否:',$hunfou0 ? '已婚' : '未婚';
echo '<hr>';
echo '姓名:',$name,'<br>年龄:',$age,'<br>婚否:',$hunfou1 ? '已婚' : '未婚';
Correcting teacher:韦小宝Correction time:2018-12-15 09:51:12
Teacher's summary:代码肯定需要好好敲啊!还需要认真敲!还要多练习才可以!