Re: [PHP] Ever complained about lousy PHP programmers?
I prefer single quotes on stuff that doesn't need to be parsed. In most cases this is more efficient, though probably not noticed except on a large scale. I also think it makes it easier to include html strings (because double quotes don't need to be escaped) and I find it easier to work my code in Homesite. echo 'p'.$something.' '.$something_else.'/p'; rather than echo p$something $something_else/p; --- Peter Hutnick [EMAIL PROTECTED] wrote: Well, here's your chance to criticize a newbie. As an exercise in learning PHP I have written a rot-13 script. It is at http://hutnick.com/rot13/index.html?show_content=1 . I'm soliciting comments on style, technique, etc. Be brutal, but don't get your feelings hurt if I don't take your comments as gospel. References will help me take comments to heart. It will be easier on me if you send or CC comments to [EMAIL PROTECTED] Thanks a million! -Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Ever complained about lousy PHP programmers?
Since no one else has asked, I'll bite. Why not just use str_rot13()? brutal The biggest problem I have with your code is that you didn't learn enough about the language to know that this was already in the code. As a newb, you need to set down with your favorite version of the manual (I keep the windows help version open at all times) and familiarize yourself with the language. You do not need to memorize each function' signature but it would help if you read the description of each function. You'll be surprised what you find in there. /brutal =C= * * Cal Evans * Stay plugged into your audience. * http://www.christianperformer.com * -Original Message- From: Peter Hutnick [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 16, 2003 10:40 AM To: [EMAIL PROTECTED] Subject: [PHP] Ever complained about lousy PHP programmers? Well, here's your chance to criticize a newbie. As an exercise in learning PHP I have written a rot-13 script. It is at http://hutnick.com/rot13/index.html?show_content=1 . I'm soliciting comments on style, technique, etc. Be brutal, but don't get your feelings hurt if I don't take your comments as gospel. References will help me take comments to heart. It will be easier on me if you send or CC comments to [EMAIL PROTECTED] Thanks a million! -Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Ever complained about lousy PHP programmers?
Olinux wrote: I prefer single quotes on stuff that doesn't need to be parsed. In most cases this is more efficient, though probably not noticed except on a large scale. I also think it makes it easier to include html strings (because double quotes don't need to be escaped) and I find it easier to work my code in Homesite. echo 'p'.$something.' '.$something_else.'/p'; rather than echo p$something $something_else/p; Both the zend accelerator (lower price for small businesses now) and the ioncube system (free) optimize any minor double-quote performance out after the first run, so it should be a non-issue for more and more people. Additionally, as you mention, it's really only an issue on largescale system (or systems under heavy load). It's completely a comfortability issue - I personally find the double-quoted version easier both to read and to type. It's not my favorite use of time to do extra typing just to try to shave off 2 tenths of a millisecond for the processor - computers are here to make life easier (supposedly!) :0 Michael Kimsal LogiCreate http://www.phpappserver.com 734-480-9961 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Ever complained about lousy PHP programmers?
Well, here's your chance to criticize a newbie. As an exercise in learning PHP I have written a rot-13 script. It is at http://hutnick.com/rot13/index.html?show_content=1 . I'm soliciting comments on style, technique, etc. Be brutal, but don't get your feelings hurt if I don't take your comments as gospel. References will help me take comments to heart. It will be easier on me if you send or CC comments to [EMAIL PROTECTED] Thanks a million! -Peter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php