php知识点汇总与解答

This section contains Aptitude Questions and Answers on PHP Operators.

本节包含有关PHP运算符的 Aptitude问答。

1) Which of the following types of operators are used in PHP?

  1. Arithmetic Operators

  2. Logical Operators

  3. Array Operators

  4. String Operators

Options:

  1. A and B

  2. C and D

  3. A, B, and C

  4. A, B, C, and D

Answer & Explanation

Correct answer: 4
A, B, C, and D

All given options are correct types of operators are used in PHP.

1)PHP中使用以下哪种运算符?

  1. 算术运算符

  2. 逻辑运算符

  3. 数组运算符

  4. 字符串运算符

选项:

  1. A和B

  2. C和D

  3. A,B和C

  4. A,B,C和D

答案与解释

正确答案:4
A,B,C和D

所有给定的选项都是PHP中使用的正确运算符类型。

2) What is the correct output of the given code snippets?

<?php
$NUM1 = 3;
$NUM2 = 4;
$NUM3 = $NUM1 ** $NUM2;
echo $NUM3;
?>

  1. 12

  2. 81

  3. Garbage value

  4. None of the above

Answer & Explanation

Correct answer: 2
81

The above code will print "81" on the webpage. Because ** operator is used for exponential.

2)给定代码段的正确输出是什么?

  1. 12

  2. 81

  3. 垃圾价值

  4. 以上都不是

答案与解释

正确答案:2
81

上面的代码将在网页上打印“ 81” 。 因为**运算符用于指数。

3) The "**" operator belongs to which category of operators?

  1. Arithmetic operator

  2. Logical operator

  3. Comparison operator

  4. Conditional operator

Answer & Explanation

Correct answer: 1
Arithmetic operator

The ** operator belongs to arithmetic operators.

3)“ **”运算符属于哪一类运算符?

  1. 算术运算符

  2. 逻辑运算符

  3. 比较运算符

  4. 条件运算符

答案与解释

正确答案:1
算术运算符

**运算符属于算术运算符。

4) Which of the following are comparison operators in PHP?

  1. ==

  2. !=

  3. ===

  4. < = >

Options:

  1. A and B

  2. C and D

  3. A, B, and C

  4. A, B, C, and D

Answer & Explanation

Correct answer: 4
A, B, C, and D

All the given options are comparison operators.

4)以下哪个是PHP中的比较运算符?

  1. ==

  2. !=

  3. ===

  4. <=>

选项:

  1. A和B

  2. C和D

  3. A,B和C

  4. A,B,C和D

答案与解释

正确答案:4
A,B,C和D

所有给定的选项都是比较运算符。

5) What is the correct output of given code snippets?

<?php
$NUM1 = 3;
$NUM2 = 4;
var_dump($NUM1<>$NUM2);
?>

  1. bool(true)

  2. bool(false)

  3. Error

  4. None of the above

Answer & Explanation

Correct answer: 1
bool(true)

The above code will print bool(true) on the webpage, the <> operator is "not equal to" operator.

5)给定代码段的正确输出是什么?

  1. 布尔值(true)

  2. 布尔值(false)

  3. 错误

  4. 以上都不是

答案与解释

正确答案:1
布尔值(true)

上面的代码将在网页上打印bool(true) , <>运算符为“不等于”运算符。

6) What is the correct output of given code snippets?

<?php
$NUM1 = 3;
$NUM2 = 4;
var_dump($NUM1!==$NUM2);
?>

  1. bool(true)

  2. bool(false)

  3. Error

  4. None of the above

Answer & Explanation

Correct answer: 1
bool(true)

The above code will print bool(true) on the webpage.

6)给定代码段的正确输出是什么?

  1. 布尔值(true)

  2. 布尔值(false)

  3. 错误

  4. 以上都不是

答案与解释

正确答案:1
布尔值(true)

上面的代码将在网页上打印bool(true) 。

7) What is the correct output of given code snippets?

<?php
$NUM1 = 3;
$NUM2 = 4;
var_dump($NUM1<=>$NUM2);
?>

  1. int(0)

  2. int(-1)

  3. int(1)

  4. Error

Answer & Explanation

Correct answer: 2
int(-1)

The above code will print "int(-1)" on the webpage.

7)给定代码段的正确输出是什么?

  1. 整数(0)

  2. 整数(-1)

  3. 整数(1)

  4. 错误

答案与解释

正确答案:2
整数(-1)

上面的代码将在网页上打印“ int(-1)”

8) Which of the following operator is not available in PHP?

<?php
$num = "Hello";
var_dump($num);
?>

  1. Dot (.)

  2. =

  3. .=

  4. @

Answer & Explanation

Correct answer: 4
@

The @ operator is not available in PHP.

8)以下哪个运算符在PHP中不可用?

  1. 点(。)

  2. =

  3. 。=

  4. @

答案与解释

正确答案:4
@

@运算符在PHP中不可用。

9) What is the correct output of given code snippets?

<?php
echo $country = $country ?? "india";
?>

  1. india

  2. garbage value

  3. Error

  4. None of the above

Answer & Explanation

Correct answer: 1
india

The above code will print the "india" on the webpage.

9)给定代码段的正确输出是什么?

  1. 印度

  2. 垃圾价值

  3. 错误

  4. 以上都不是

答案与解释

正确答案:1
印度

上面的代码将在网页上打印“印度”

10) Which of the following operator is known as null coalescing in PHP?

  1. < == >

  2. ===

  3. ??

  4. ?

Answer & Explanation

Correct answer: 3
??

The ?? operator is known as the null coalescing operator in PHP.

10)以下哪个运算符在PHP中被称为空合并?

  1. <==>

  2. ===

  3. ??

答案与解释

正确答案:3
??

?? 运算符在PHP中被称为空合并运算符。

翻译自: https://www.includehelp.com/php/operators-aptitude-questions-and-answers.aspx

php知识点汇总与解答

php知识点汇总与解答_PHP操作员能力倾向问题与解答相关推荐

  1. C# 零基础入门知识点汇总

    C# 零基础入门 知识点汇总 前言 一,基础语法(1~10) 二,流程控制(11~20) 三,数组相关(21~30) 四,函数介绍(31~40) 五,类和对象(41~50) 六,面向对象(51~60) ...

  2. 机器学习、深度学习面试知识点汇总

    作者丨Oldpan 来源丨oldpan博客 编辑丨极市平台 导读 本文总结了一些秋招面试中会遇到的问题和一些重要的知识点,适合面试前突击和巩固基础知识. 前言 最近这段时间正临秋招,这篇文章是老潘在那 ...

  3. 软件项目策划与管理知识点汇总

    categories: [计算机通识,软件项目策划与管理] thumbnail: /images/fe/rjxmchhgl.jpg toc: true 软件项目策划与管知识点汇总 第一章:序言 关于软 ...

  4. 原生 遍历_细品原生JS从初级到高级知识点汇总(三)

    作者:火狼1 转发链接:https://juejin.im/post/5daeefc8e51d4524f007fb15 目录 细品原生JS从初级到高级知识点汇总(一) 细品原生JS从初级到高级知识点汇 ...

  5. mysql 事物状态有几种_MySQL知识点汇总:亿级高并发数据库运转原理大公开!

    - 点击上方"中国统计网"订阅我吧!- 做业务,要懂基本的SQL语句: 做性能优化,要懂索引,懂引擎: 做分库分表,要懂主从,懂读写分离... 数据库的使用,是开发人员的基本功,对 ...

  6. java基础知识大全,java 基础知识点汇总

    java 基础知识点汇总 问题一:我声明了什么! String s = "Hello world!"; 许多人都做过这样的事情,但是,我们到底声明了什么?回答通常是:一个Strin ...

  7. python拷贝是什么知识点_python闭包、深浅拷贝、垃圾回收、with语句知识点汇总...

    1.1 闭包 1.闭包概念 1. 在一个外函数中定义了一个内函数,内函数里运用了外函数的临时变量,并且外函数的返回值是内函数的引用,这样就构成了一个闭包 2. 一般情况下,在我们认知当中,如果一个函数 ...

  8. list python 访问 键值对_基础|Python常用知识点汇总(中)

    字符串字符串是 Python 中最常用的数据类型.我们可以使用引号('或")来创建字符串.1.创建字符串 str1 = 'Hello World!' str2 = "Hello W ...

  9. javaSE知识点汇总

    javaSE知识点汇总 Java基础知识精华部分   写代码: 1,明确需求.我要做什么? 2,分析思路.我要怎么做?1,2,3. 3,确定步骤.每一个思路部分用到哪些语句,方法,和对象. 4,代码实 ...

最新文章

  1. img标签 文件不存在_HTML常用标签
  2. 2019第一篇万字长文!30+家一线投资机构已出投资新策略...
  3. 网络强制消费案例剖析
  4. 合作 | 2018数博会AI全球赛项目征集!提供场景、数据集,总奖金池500万
  5. dhcp服务器批量修改ip租期,dhcp服务器的ip地址租期默认是多久
  6. 2014年5月第二个周末总结--保守自己的心
  7. nowcoder20072 [HNOI2009]图的同构
  8. 【西北师大-2108Java】第二次作业成绩汇总
  9. Google原生输入法LatinIME词库构建流程分析(一)
  10. Java 导出时序折线图到Excel
  11. HIBOX/OPENBOX接收JBS、蜻蜓的遥控器设置
  12. PS裁剪图片上任意形状区域
  13. 代码详解:以股票预测为例,揭秘时间序列预测
  14. 关于固态硬盘的数据擦除
  15. 合计函数(统计函数)
  16. 如何自学Java 经典
  17. Lambda表达式和方法引用综合案例(获取年龄最大的两个用户的 姓)
  18. turtle画微笑表情
  19. 算法的时间复杂度 递推
  20. 32位掩码转换成子网掩码

热门文章

  1. (五)Linux之设备驱动模型
  2. mysql 查询倒数第二条记录_MySQL查询倒数第二条记录实现方法
  3. pytorch如何计算导数_PyTorch怎么用?来看这里
  4. excel 区间人数柱状图_Excel中,区间统计的3种技巧都不掌握,那就真的OUt了!
  5. linux将视频导入到iphone,如何将 IPhone 的文件导入 Linux
  6. Redis主从复制原理学习
  7. 获取Linux内存、cpu、磁盘IO等信息
  8. Kafka:集群部署
  9. Redis(二):Redis入门与性能测试
  10. 深度学习框架PyTorch一书的学习-第四章-神经网络工具箱nn