NYCPHP Meetup

[nycphp-talk] pcntl_fork() assistance

Ben Sgro (sk) skyline at publicmine.com
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 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



------------------------------------------------------------------------------


  _______________________________________________
  New York PHP Community Talk Mailing List
  http://lists.nyphp.org/mailman/listinfo/talk

  NYPHPCon 2006 Presentations Online
  http://www.nyphpcon.com

  Show Your Participation in New York PHP
  http://www.nyphp.org/show_participation.php
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20060920/3c73c992/attachment.html>


More information about the talk mailing list