PHP Face question Description:
Example: My name is Fanglor = "ym Eman si Orlgnaf
Answers to the PHP interview questions:
Copy the Code code as follows:
function Restr ($STR){$str 1 = Explode ("', $str);$str 2 = ";$temp = ";for ($i =0; $i
{$str 2.
The focus of this paper is on the persistence and denotation of PHP learning and development.
When many people take their three months to learn PHP as a kind of capital everywhere to show off.
When these people show off and switch to other languages.
A string is series of characters.
String access and modification by character
Characters within strings May is accessed and modified by specifying the zero-based offset of the desired character after The string using square array brackets, as in
Baidu consulted some of the information, combined with some of their own experience, the following solutions:
Copy the Code code as follows:
$idlist = ";for ($i =1; $i if ($i ==1) {$idlist =mt_rand (3,25216);}else{$idlist = $idlist. ', '. Mt_rand
1. About capitalization
PHP's built-in functions and structures are case-insensitive.
Such as:
Copy the Code code as follows:
hellophp
Echo ("Hello PHP");ECHO ("Hello PHP");Echo ("Hello PHP");?>
The effect of these three is the same.
Other, user-
A friend to find a job to meet the questions, notes.
It is very likely that I will meet in the future.
Problem: PHP does not use built-in functions for array sorting, possibly descending or ascending
The first method: the legendary bubbling
Copy CodeThe code is as follows:
Class Cacheexception extends Exception {}/*** Caching Abstract classes*/Abstract class Cache_abstract {/*** Read Cache variables** @param string $key cache subscript* @return Mixed*/Abstract public Function fetch
Task 2: Recognize the scope of the variable
⚑ local variables and global variables
The existence of a variable has its life cycle, and we can make it exist within a small function, or it can exist throughout the program. For a variable declared in
Recently developed social game, found that the use of this thing is still relatively ordinary, here to make a summary, one for their own memory, but also hope that everyone has help.
First look at the demand, if we develop social game on Facebook,
Are downloading the latest recommended version, originally did not expect to send to the jar, so did not, later summed up to Notepad when found there are quite a lot of problems, so share out, I hope to everyone
Helpful. In doing the experiment, I
http://code.google.com/apis/ajaxsearch/documentation/#fonje
Copy the Code code as follows:
//This example request includes a optional API key which you'll need to //remove or replace with your own Key. //Read More on why it's useful to has an API
This is a PHP code that can be specific to hours.
Copy the Code code as follows:
/* Author: Yangyu yangyu@sina.cn */Enter two timestamp, calculate the difference, that is, the number of hours of difference, such as return 2:10, that is, the two
Instead focusing for a few days, finally figured out the truth inside. Write here, please correct me.
The idea of the collection program is very simple, is simply to hit a page, is generally a list page, get the address of all the links inside, and
Here are a few more common methods:
First introduce the data table structure involved, four fields:
Copy the Code code as follows:
UID
: User ID
session_id
: The system-generated session_id,php after user login is obtained using
Each PHP script limits the execution time, so we need to set a script to execute indefinitely with Set_time_limit, and then use Flush () and Ob_flush () to clear the server buffer and output the return value of the script at any time.
As in the
The following regular:
$a = ' 2
tóng
dòng
Canton 3 ';echo preg_replace ('/[^ /', ', $a);
Will prompt:
Warning:preg_replace (): Unknown modifier ' P ' in E:\phpLearn\test.php on line 12
If the lookup succeeds, the remainder of the string (from the matching point) is returned, and false is returned if the string is not found.
Version support: PHP
Grammar:
Stristr (String,find)
Description
string is required. Specifies the string to
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service