[nycphp-talk] pcntl_fork() assistance

Ben Sgro (sk) skyline at
Wed Sep 20 14:01:12 EDT 2006

Hey Chris, 

(Offtopic of fork( ), but in response to Chris)

Since you have double quotes, can't you just say
print "Here's the string: --$the_string--"; 

Also, I find it easy to do 
print "string($string)";

- Ben
  ----- Original Message ----- 
  From: Chris Merlo 
  To: NYPHP Talk 
  Sent: Wednesday, September 20, 2006 1:50 PM
  Subject: Re: [nycphp-talk] pcntl_fork() assistance

  On 9/20/06, Joseph Crawford <codebowl at> 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.


  New York PHP Community Talk Mailing List

  NYPHPCon 2006 Presentations Online

  Show Your Participation in New York PHP
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the talk mailing list