《腾讯 2022年PHP工程师面试题(应聘 求职 面试准备资料).docx》由会员分享,可在线阅读,更多相关《腾讯 2022年PHP工程师面试题(应聘 求职 面试准备资料).docx(4页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、腾讯2022年PHP工程师面试题第1题:Question 1 What does ? echo count (,123n) ? print out?A)3B) False C) Null D) 1 E) 0第2题:Which of the following snippets prints a representation of 42 with two decimal places?A) printf(,%.2dnn, 42);B) printf(,%1.2fnM, 42);C) printf(,%1.2unM, 42);第3题:Given $text = Content-Type: text
2、/xml1; Which of the following prints text/xml?AjprintsubstrfStexstrchrlStext/:1);BjprintsubstrfStexttrchrlStext/J+l);C)printsubstr($text,strpos($text,:l)+1);D)printsubstr($text,strpos($text/:l)+2);-1-E) printsubstrfStexOtrchrtStext/:1)第4题:Whatisthevalueof$a?php $a=in_array(,01,array(,l,)=var_dump(,0
3、1,=l);*A)TrueB)False第5题:Whatisthevalueof$resultinthefollowingPHPcode?phpfunctiontimesTwo($int)$int=$int*2;)-2-$int=2;$result=timesTwo($int);?7NULL第6题:Thecodebelow because . C?phpclassFoo?phpfunctionbar()pnnt,bar,1;)A)willwork,classdefinitionscanbesplitupintomultiplePHPblocks.-3-B)willnotwork,classdefinitionsmustbeinasinglePHPblock.C)willnotwork,classdefinitionsmustbeinasinglefilebutcanbeinmultiplePHP blocks.D)willwork,classdefinitionscanbesplitupintomultiplefilesandmultiplePHP blocks.4