PHP Junior Interview Questions are for programmers with little experience who are just looking for a job. This provides a lot of help for us to go out for interview, InterviewOfficial meetings often test us, and the interview questions played a big role at this time
20. In PHP, heredoc is a A special string, its end mark must be the same as the beginning, and there must be a line break before the end mark, followed by a semicolon
20. Write the SQL of the names of the ten people with the most posts, using the following table: members(id,username,posts,pass,email)
select username from members order by posts DESC limit 10
21. Please explain the difference between passing by value and passing by reference in PHP. When to pass by value and when to pass by reference?
Pass by value: Any changes to the value within the scope of the function will be ignored outside the function
22. What is the function of error_reporting in PHP?
Used to configure the level of error message reporting
23. Please write a function verification email Is the format correct
function validateEmail($email) { if(eregi('^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+(.[a-z0-9-]+)*$',$email) ){ return true; }else{ return false; } }
echo $_SERVER['scrīpt_FILENAME']."?".$_SERVER['QUERY_STRING'];
26. What is the function of the JS form pop-up dialog box? The function of getting input focus is?alert(),prompt(),confirm() //弹出对话框
focus() //输入焦点
window.location.href //转向跳转函数
<scrīpt src=""/> //引入外部js文件
28. How to declare a class named "myclass" without methods and attributes?
class myclass{ ... };
$newmyclass = new myclass();
$temp=$newmyclass->testvalue;
$newmyclass->testvalue="a";
mysql_fetch_row //从结果集中取得一行作为枚举数组 mysql_fetch_array //从结果集中取得一行作为关联数组,或数字数组,或二者兼有
Don’t worry after reading the above interview questions. There are other interview questions. It is best to consolidate the basic things to help us interview and find jobs.
Related recommendations:
php Junior Interview Questions Brief Description Questions (1)
Brief description of PHP junior interview questions (2)
5 common questions among PHP junior developersThe above is the detailed content of Brief description of PHP entry-level interview questions (3). For more information, please follow other related articles on the PHP Chinese website!