NYCPHP Meetup

[nycphp-talk] pcntl_fork() assistance

Chris Merlo chris at theyellowbox.com
Wed Sep 20 13:50:53 EDT 2006


On 9/20/06, Joseph Crawford <codebowl at gmail.com> wrote:
>
> Hey guys,
>
> I am trying to use pcntl_fork() on the mac, hoever when i do
>
> $pid = pcntl_fork();
> echo $pid; // nothing returns
> I am guessing that it is returning a blank string but not sure how to
> debug that, i tried var_dump($pid) but i get nothing (not sure if this is
> due to being a command line util or not.
>

This is not specific to the pcntl_fork question (which I can't answer), but
if you're ever testing whether a string is empty, try something like this:

print "Here's the string: --" . $the_string . "--";

If you get "----" as output, the string is empty.
-c
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20060920/4575b75b/attachment.html>


More information about the talk mailing list