易截截图软件、单文件、免安装、纯绿色、仅160KB

YAHOO PHP面试题

知道差距了,努力吧!
1. Which of the following will not add john to the users array?
1. $users[] = 'john';
2. array_add($users,'john');
3. array_push($users,'john');
4. $users ||= 'john';
2. What's the difference between sort(), asort() and ksort? Under what circumstances would you use each of these?
3. What would the following code print to the browser? Why?
$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?
5. What functions can you use to add library code to the currently running script?
6. What is the difference between foo() & @foo()?
7. How do you debug a PHP application?
8. What does === do? What's an example of something that will give true for '==', but not '==='?
9. How would you declare a class named “myclass” with no methods or properties?
10. How would you create an object, which is an instance of “myclass”?
11. How do you access and set properties of a class from within the class?
12. What is the difference between include & include_once? include & require?
13. What function would you use to redirect the browser to a new page?
1. redir()
2. header()
3. location()
4. redirect()
14. What function can you use to open a file for reading and writing?
1. fget();
2. file_open();
3. fopen();
4. open_file();
15. What's the difference between mysql_fetch_row() and mysql_fetch_array()?
16. What does the following code do? Explain what's going on there.
$date='08/26/2003';
print ereg_replace(“([0-9]+)/([0-9]+)/([0-9]+)”,2/1/3,$date);
17. Given a line of text $string, how would you write a regular expression to strip all the HTML tags from it?
18. What's the difference between the way PHP and Perl distinguish between arrays and hashes?
19.


相关文档:

Apache+Mysql+Php安装文档(rpm版本)

  1.mysql
  在如下页面下载mysql的for linux rpm包
   http://www.mysql.com/downloads/down...3.52-1.i386.rpm ;
   http://www.mysql.com/downloads/down...3.52-1.i386.rpm ;
  存至/home/tmp目录
  命令列表: 
  cd /home/tmp
  rpm -ivh MySQL-3.23.52-1.i386.rpm #安装mysql serv ......

PHP中$_SERVER的详细参数与说明

PHP编程中经常需要用到一些服务器的一些资料,特把$_SERVER的详细参数整理下,方便以后使用。
$_server 代码
1. $_SERVER['PHP_SELF'] #当前正在执行脚本的文件名,与 document root相关。
2. $_SERVER['argv'] # 传递给该脚本的参数。
3. $_SERVER['argc'] # 包含传递给程序的命令行参数的个数(如果运行 ......

PHP 正则表达式资料


 每个PHP程序员都知道PHP有强大的正则表达式功能,为了以后的工作方便,我从网上整理了关于正则表达式的资料,方便以后工作时的进行资料查阅。 
  正则表达式(regular expression)描述了一种字符串匹配的模式,可以用来检查一个串是否含有某种子串、将匹配的子串做替换或者从某个串中取出符合某个条件的子串等。 ......

2010年最新PHP类的精缩归纳

一:结构和调用(实例化):
class className{} ,调用:$obj = new className();当类有构造函数时,还应传入参数。如$obj = new className($v,$v2...);
二:构造函数和析构函数:
1、构造函数用于初始化:使用__construct(),可带参数。
2、但析构函数不能带参数(用于在销去一个类之前执行一些操作或功能)。析构函数用 ......

用PHP实现一个双向队列

<?php
class DoubleQueue
{
public $queue = array();
/**(尾部)入队 **/
public function push($value)
{
return array_push($this->queue,$value);
}
/**(尾部)出队**/
public function pop()
{
return array_pop($this->queu ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号