1 second = millisecond = 1000,000 microsecond = 1000,000,000 nanosecond
PHP has no default function for milliseconds, but it provides a microtime () function that returns two elements, one for seconds, and one for fractional milliseconds, which
The declare structure is used to set execution instructions for a piece of code. The syntax of declare is similar to other process Control structures:
DECLARE (Directive) statement
The directive section allows you to set the behavior of the
Here is a summary of several character functions in PHP, a summary:
1) Ucfirst
Capitalize the first letter, such as
$string = "This is my web development blog";
echo Ucfirst ($string);
Output:this is my web development blog
2) Lcfirst, lower
Object initialization
To create a new object, instantiate a class using the new statement:
do_foo (); >
Convert to Object
If you convert an object to an object, it will not change. If any other type of value is converted to an object, an instance of
"; $list = Array () ;//Here the result map$c1 = Preg_match_all ('//', $str, $m 1);//First Remove all img tag text for ($i =0; $i
The output results are as follows:
----------PHP----------Array ( [0]/= array ( [title] + Small
In the development, there are often some simple tree structure storage, such as product multilevel classification, multi-level navigation bar menu, and so on, these objects have a feature, is usually to get the whole tree structure. There are three
PHP provides a large number of predefined variables. Because many variables depend on the version and settings of the server that is running, and other factors, no detailed documentation is provided. Some of the predefined variables do not take
First step: Find the Apache boot command:
Ps-ef|grep httpdroot 10575 1 0 19:45? 00:00:03/usr/sbin/httpd-k startmyuser 15356 2982 0 Jan19 ? 00:00:00 /home/apache/bin/httpd-f/home/apache/conf/httpd.conf-k start
If you see the
PHP itself is a function that has a multidimensional array ordering.
BOOL Array_multisort (array $ar 1 [, Mixed $arg [, mixed $ ... [, Array $ ...]] )
The following is a description of the Array_multisort function in the manual:
Array_multisort ()
Do you remember the basic mathematical knowledge that you learned in school? Just like them.
Arithmetic operators
Example name result
-The negative value of the inverse $a $a taken.
$a + $b addition $a and $b.
$a-the difference between $b
In Web application development, people often use the session to store data. However, some people may not know that in PHP, the use of the session may cause concurrency problems. Plus91 Technologies Senior Engineer Kishan Gor, a software solutions
1.function Test ($arr) {}
echo Test (& $arr);
2.function Test (& $arr) {}
echo Test ($arr);
1 and 2 are the same effect.
3.function &test ($arr) {return $result;}
echo &test ($a); effective
echo test ($a); Returns a value, not a reference
Summary:
Require and include two ways to provide different use flexibility.
Require use methods such as require ("myrequirefile.php");. This function is usually placed at the front of the PHP program, and before the PHP program is executed, it is read into
The function of the curl_setopt () parameter is to set the dialog parameters for one curl.
The function of the Curl_setopt_array () parameter is to set the dialog parameters for a curl in the form of an array.
----------------------------
$ch =
(1) The program starts once after the scheduled task is set up, and the program runs until the server restarts.
(2) If you run it repeatedly, it may not be the result you want, so you will start multiple same scheduled tasks
(3) If each page include
Break
(PHP 4, PHP 5)
Break ends the execution of the current for,foreach,while,do-while or switch structure.
Break can accept an optional numeric parameter to decide to jump out of a few loops.
\n"; } /* Use optional parameter */ $i = 0;
PHP has a very rich built-in function, many of which we have used, but still have a lot of functions we are not familiar with, but they are very useful. In this article, I've listed some little-known PHP functions that will make your eyes
The difference between the D () and M () methods:
The difference between D and M is mainly
The M method does not need to create a model class file, and the M method does not read the model class, so automatic validation is not valid by default,
The so-called curd. That is, four basic operations on database operations (curd): c:create (Create), u:update (update), R:read (read), and D:detele (delete).
In thinkphp, it is not certain to use the methods of these names, here are the common:
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