Blogger Information
Blog 38
fans 1
comment 0
visits 26083
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
变量的声明以及函数体--2018年08月22日22时40分
一根火柴棒的博客
Original
610 people have browsed it

1.问答题: 什么是变量的作用域:

0822手抄作业.jpg

实例

<meta charset="UTF-8">

<?php

//2. 编程: 变量的类型与检测

$int = 80;
$string = '张三';
$bool = true;
$array = ['一','二','三'];
$double = 52.8;

print(gettype($double));

//3. 编程: 分支结构的实例
echo '<br>';

$score = 80;

switch ($score)
{
    case $score > 90 :
        print('优秀');
        break;
    case $score > 60 :
        print('合格');
        break;
    default:
        print('不及格');
}

运行实例 »

点击 "运行实例" 按钮查看在线实例



Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments