[PHP] Re: Stupid newbie question = Why don't I need a ; after this line?
Thanks guys. Duhhh. I was taught to always put ;'s and any dev software that writes it's own code does the same. I also remember adding them because I was getting error's at some point, perhaps PHP3. Is it considered better practice to use them? Otherwise I've been wasting keystrokes. I only noticed this when I was going over some code. Paul [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Thanks for any advice. Can anyone tell me why I do not get any errors with ( no ; after _id'] ) ?php echo $row_otherlawyer['lawyer_id']? ?php echo NO ERROR;? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Stupid newbie question = Why don't I need a ; after this line?
I always use them ... but it's mainly 'cause if I ever need to expand the code, I won't have to remember to add them ... it's for the same reason I always use the braces '{ ... }' even though the short form would work just as well in many cases ... I tend to expand my code alot with time (as I make it more advanced), and recycle it across multiple projects ... it's simply easier if all the thingies are there already, as it produces far less errors when copy/pasting from file to file Rene Fate would have it, that on Tue, 27 Jan 2004 09:56:02 -0600, Paul wrote: Thanks guys. Duhhh. I was taught to always put ;'s and any dev software that writes it's own code does the same. I also remember adding them because I was getting error's at some point, perhaps PHP3. Is it considered better practice to use them? Otherwise I've been wasting keystrokes. I only noticed this when I was going over some code. -- Rene Brehmer aka Metalbunny http://metalbunny.net/ References, tools, and other useful stuff... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: stupid newbie question
Actually, there is a unix-like fork() function in an extension. exec() will execute another process, but it isn't really a fork(). Look at the pcntl extension and check out pcntl_fork(). I've been working with it for a few days and it works pretty well. It's still marked EXPERIMENTAL, so don't rely too much on it. I have no idea as to its stability. And it's probably only truly useful for command line php. (As for the funkyness, kill zombies with pcntl_waitpid().) J Richard Lynch wrote: http://php.net/exec You'll need to use in the command to be executed. That command may or may not need to be wrapped up in a shell script to muck with stdin/stderr/stdout so that PHP isn't waiting for those to be freed up... Or something like that. I don't really understand it, I just know that programs that use stdin/stdout/stderr have to be treated funky. -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm - Original Message - From: Paul Procacci [EMAIL PROTECTED] Newsgroups: php.general To: [EMAIL PROTECTED] Sent: Thursday, October 04, 2001 10:12 PM Subject: stupid newbie question How do u fork? Thanks ahead of time : ) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: stupid newbie question
http://php.net/exec You'll need to use in the command to be executed. That command may or may not need to be wrapped up in a shell script to muck with stdin/stderr/stdout so that PHP isn't waiting for those to be freed up... Or something like that. I don't really understand it, I just know that programs that use stdin/stdout/stderr have to be treated funky. -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm - Original Message - From: Paul Procacci [EMAIL PROTECTED] Newsgroups: php.general To: [EMAIL PROTECTED] Sent: Thursday, October 04, 2001 10:12 PM Subject: stupid newbie question How do u fork? Thanks ahead of time : ) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]