Re: Cannot understand this libcurl script, any help?
- From: Jerry Stuckle <jstucklex@xxxxxxxxxxxxx>
- Date: Sun, 01 Jul 2007 12:14:45 -0400
Iván Sánchez Ortega wrote:
Ming wrote:
do {[...]
curl_multi_exec($mh,$running);
} while ($running > 0);
What does $running mean? $running is NULL at first,
No. It's undeclared at first.
how it becomes a value which is greater than zero?
http://www.php.net/manual/en/function.curl-multi-exec.php
"A reference to a flag to tell whether the operations are still running."
Now, re-read your programming books, looking for anything
on "pass-by-reference parameters". That should clear your mind.
No, $running is null. When you edited the post, you dropped:
$running=null;
As for how it changes - $running is passed by reference. This means if curl_multi_exec changes the value of $running, the real value of $running (not a copy) will change, and you will be able to test it in your do...while loop.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.
- References:
- Prev by Date: Re: The structure of PHP/Web Application coding.
- Next by Date: Counting survey votes
- Previous by thread: Cannot understand this libcurl script, any help?
- Next by thread: Openings HSBC/Mirage/PCS/WIPRO/HCL/Siemens
- Index(es):
Relevant Pages
|