预览加载中,请您耐心等待几秒...
1/7
2/7
3/7
4/7
5/7
6/7
7/7

在线预览结束,喜欢就下载吧,查找使用更方便

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

Yahoo的PHP面试题 Yahoo的PHP面试题 Afriendrecentlygotsomepre-interviewquestionsfromYAHOOforaPHPjob.FollowingupmypreviouspostaboutprogrammerquestionsIthoughtIwouldpostthemtogivepeopleexamplesofwhatalargecorporationlikeYAHOOasks. 1.Whichofthefollowingwillnotaddjohntotheusersarray? 1.$users[]=‘john’; 2.array_add($users,’john’); 3.array_push($users,‘john’); 4.$users||=‘john’; 2.What’sthedifferencebetweensort(),assort()andksort?Underwhatcircumstanceswouldyouuseeachofthese? 3.Whatwouldthefollowingcodeprinttothebrowser?Why? $num=10; functionmultiply(){ $num=$num*10; } multiply(); echo$num; 4.Whatisthedifferencebetweenareferenceandaregularvariable?Howdoyoupassbyreference&whywouldyouwantto? 5.Whatfunctionscanyouusetoaddlibrarycodetothecurrentlyrunningscript? 6.Whatisthedifferencebetweenfoo()&@foo()? 7.HowdoyoudebugaPHPapplication? 8.Whatdoes===do?What’sanexampleofsomethingthatwillgivetruefor‘==’,butnot‘===’? 9.Howwouldyoudeclareaclassnamed“myclass”withnomethodsorproperties? 10.Howwouldyoucreateanobject,whichisaninstanceof“myclass”? 11.Howdoyouaccessandsetpropertiesofaclassfromwithintheclass? 12.Whatisthedifferencebetweeninclude&include_once?include&require? 13.Whatfunctionwouldyouusetoredirectthebrowsertoanewpage? 1.redir() 2.header() 3.location() 4.redirect() 14.Whatfunctioncanyouusetoopenafileforreadingandwriting? 1.fget(); 2.file_open(); 3.fopen(); 4.open_file(); 15.What’sthedifferencebetweenmysql_fetch_row()andmysql_fetch_array()? 16.Whatdoesthefollowingcodedo?Explainwhat’sgoingonthere. $date=’08/26/2003’; printereg_replace(“([0-9]+)/([0-9]+)/([0-9]+)”,2/1/3,$date); 17.Givenalineoftext$string,howwouldyouwritearegularexpressiontostripalltheHTMLtagsfromit? 18.What’sthedifferencebetweenthewayPHPandPerldistinguishbetweenarraysandhashes? 19.HowcanyougetroundthestatelessnatureofHTTPusingPHP? 20.WhatdoestheGDlibrarydo? 21