By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,972 Members | 1,092 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,972 IT Pros & Developers. It's quick & easy.

Resource

P: n/a
HI
what is the application of resource variable

May 21 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On 21.05.2007 08:36 ja*******@gmail.com wrote:
HI
what is the application of resource variable
Resource variable is where php extensions store their data. You usually
obtain a resource from some 'init' type function and then simply pass it
around. You cannot read or inspect the content of such variable.

Pseudocode example:

$resource = extension_init_func();
extension_do_something($resource);
extension_do_something_else($resource);
etc
extension_deinit_func($resource);
Real world example:

$cc = curl_init();
curl_setopt($cc, CURLOPT_URL, "blah");
curl_exec($cc);
curl_close($cc);

--
gosha bine

extended php parser ~ http://code.google.com/p/pihipi
blok ~ http://www.tagarga.com/blok
May 21 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.