Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÍÆ¼ö:yahooµÄphpÃæÊÔÌâ

ºÇºÇ£¬·­ÒëÁËÆª¶«Î÷£¬N³¤Ê±¼äûÓÃÓ¢ÓïÁË£¬³öÁ˳ó´ó¼Ò¿ÉÒ»¶¨ÒªÖ¸³öÀ´°¡¡£·­Òë×Ô£ºNick Halstead's Blog
A friend recently got some pre-interview questions from YAHOO for a PHP
job. Following up my previous post about programmer questions I
thought I would post them to give people examples of what a large
corporation like YAHOO asks.
×î½üһλÅóÓѵõ½ÁËYahooµÄһЩPHPÃæÊÔÌâÄ¿£¬ÒÀÕÕÎÒ֮ǰ·¢±í¹ØÓÚ³ÌÐòÔ±µÄÏà¹ØÎÄÕµÄÔ­Ôò£¬ÎÒÏëÎÒÓ¦¸ÃÔÚÕâÀï·¢²¼³öÀ´£¬ÒÔ¸ø¶ÁÕßÅóÓÑÃÇÌṩһЩÀý
×Ó£¬Èôó¼Ò¿´¿´ÏñYAHOOÕâÑùµÄ´ó¹«Ë¾¹ØÐÄÄÄЩÎÊÌâ¡£
1. Which of the following will not add john to the users array?
1¡¢ÏÂÃæÄĸöÑ¡ÏîûÓн« john Ìí¼Óµ½users Êý×éÖУ¿
         1. $users[] = ‘john’;
         2. array_add($users,’john’);
         3. array_push($users,‘john’);
         4. $users ||= ‘john’;
2. What’s the difference between sort(), assort() and ksort? Under what
circumstances would you use each of these?
2¡¢sort(), asort()(×¢£ºÔ­×÷ÕßΪassort,Ó¦¸ÃÊDZÊÎó)ºÍksort()
ÈýÕßÖ®¼äÓÐʲô²î±ð£¿Äã·Ö±ðÔÚʲôÇé¿öÏ»áʹÓÃÉÏÃæÈý¸öº¯Êý£¿
3. What would the following code print to the browser? Why?
3¡¢ÏÂÃæÕâ¶Î´úÂ뽫ÔÚä¯ÀÀÆ÷ÉÏ´òÓ¡³öʲôÄÚÈÝ£¿ÎªÊ²Ã´£¿
      $num = 10;
      function multiply(){
            $num = $num * 10;
      }
      multiply();
      echo $num;
4. What is the difference between a reference and a regular variable?
How do you pass by reference & why would you want to?
4¡¢ÒýÓñäÁ¿ÓëÆÕͨ±äÁ¿Ö®¼äÓкÎÇø±ð£¿ÈçºÎͨ¹ýÒýÓô«Öµ£¿ÔÚʲôÇé¿öÏ»áÕâÑù×ö£¿
5. What functions can you use to add library code to the currently
running script?
5¡¢ÄÄЩº¯Êý¿ÉÒÔ±»ÓÃÀ´Ïòµ±Ç°µÄ´úÂëÖÐÌí¼Ó¿â´úÂ룿
6. What is the difference between foo() & @foo()?
6¡¢foo()ºÍ@foo


Ïà¹ØÎĵµ£º

PHP ÖÐʹÓÃoracle »·¾³ÅäÖÃ

http://www.oracle.com/technology/global/cn/pub/notes/technote_php_instant.html
Ϊ Linux ºÍ Windows °²×° PHP ºÍ Oracle 10g Instant Client
×÷ÕߣºChristopher Jones£¬¼×¹ÇÎĹ«Ë¾µÄ×Éѯ¼¼ÊõÈËÔ±
·¢²¼ÈÕÆÚ£º2004 Äê 12 ÔÂ
Oracle 10g Instant Client£¨Ãâ·ÑÏÂÔØ£©ÊÇPHP ÓëÔ¶³Ì Oracle Êý¾Ý¿âÁ¬½ÓµÄ×î¼òµ¥·½Ê½£¬Ëü ......

PHPѧϰ ÔËËã·ûÓÅÏȼ¶ ºÍ ÔËËã·û

ÔËËã·ûÓÅÏȼ¶
ϱí´ÓµÍµ½¸ßÁгöÁËÔËËã·ûµÄÓÅÏȼ¶¡£
½áºÏ·½Ïò ÔËËã·û
×ó ,
×ó or
×ó xor
×ó and
ÓÒ print
ÓÒ = += -= *= /= .= %= &= |= ^= ~= <<= >>=
×ó ? :
×ó ||
×ó &&
½áºÏ·½Ïò ÔËËã·û
×ó |
×ó ^
×ó &
ÎÞ == != === !==
ÎÞ < <= > >=
×ó ......

php define() º¯Êý¼°defined£¨£©º¯ÊýµÄÓ÷¨


The define() function defines a constant.
define()º¯ÊýµÄ×÷ÓÃÊÇ£º¶¨ÒåÒ»¸ö³£Á¿¡£
Constants are much like variables, except for the following differences: 
³£Á¿[constant]Óë±äÁ¿[variable]ÓкܶàÏàËÆµÄµØ·½£¬Òò´Ë£¬ºÜÈÝÒ×»ìÏý£»ÏÂÃæ£¬ÎÒÃÇÁоÙһϳ£Á¿[constant]Óë±äÁ¿[variable]Ö®¼äµÄ²»Í¬µã£º
A const ......

ÈçºÎʹÓÃPHP session?

ÔÚÍùPHP SessionÀïÃæ±£´æÐÅϢ֮ǰ£¬ÐèÒªÊ×ÏÈʹÓÃsession_start()º¯ÊýÀ´Æô¶¯session,
Õâ¸öº¯Êý±ØÐëÔÚ<html>±êǩ֮ǰµ÷ÓᣴúÂëÈçÏ£º
<?php session_start(); ?>
<html>
<body>
</body>
</html>
ÔÚSessionÆô¶¯ÒԺ󣬿ÉÒÔʹÓÃPHP $_SESSION±äÁ¿À´»ñÈ¡ºÍÉèÖÃsession±äÁ¿£¬ÊµÀý´ú ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ