What is a PHP handle

Source: Internet
Author: User
A handle is a resource that operates on an object, that is, the handle of a target is the callback function. The handle (handle) can also be understood as the knob. Owning a handle is equivalent to owning a resource. Manipulating a handle is tantamount to manipulating resources. In fact, the object is not fixed in the memory address, and the fixed handle points to the address of the corresponding object in memory. It can also be said that a handle is a channel, an object that holds a certain state.

A resource cannot be used directly due to a particular sexual nature, so it is manipulated using a handle.

Like what::

1 "Operation database needs to verify the identity, the login database handle with the login information can be used to operate the database.

2 "file reading and writing has the position of the file pointer, read and write need to control the position of the pointer, the handle at this time to form a band state channel.

3 "Timer is a state, the timer is assigned to the handle, when triggered by a number of things can be processed after the handle (cancel timing, advance trigger)

4 "Baidu explains the handle when a special smart pointer when an application references another system {{database | | The handle is used when the memory block or object is managed by the operating system}.

Give a chestnut: for example, the object is your female ticket, then the handle is your female ticket mobile phone number, you do not need to be always concerned about your female ticket where, because you call directly to see where she is, release the handle is to make a call to say "we break up"!

Small chestnuts:

Resource $data = Curl_init (), curl_setopt ($data, Curlopt_url, $url); curl_setopt ($data, curlopt_nobody,true); /execute this resource according to the handle Curl_setope ($data, curlopt_returntransfet,true); $head = Curl_exec ($ch);

On the internet to see a big God said a word to share to you happy happy:

In the English word "love handle" refers to the belly can be squeezed out of the small fat, can be literally translated into "The Handle of Loving"

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.