Re: A Review Request
| From: | Alex | Date: | Sun, 22 May 2011 00:52:20 +0000 |
| Subject: | Re: A Review Request | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-313060@lists.php.net to get a copy of this message | ||
Yep, and it comes in handy, especially in school, lol, in advanced algorithms and datastructures, I
once submitted a project assignment that was 5 lines long, and instead of figuring out anagrams,
strcmp was very helpful :)
Sent from my Verizon Wireless 4GLTE smartphone
----- Reply message -----
From: "tedd" <tedd.sperling@gmail.com>
To: "Joshua Kehn" <josh.kehn@gmail.com>, "PHP General"
<php-general@lists.php.net>
Subject: [PHP] A Review Request
Date: Sat, May 21, 2011 9:26 am
At 2:49 PM -0400 5/19/11, Joshua Kehn wrote:
>On May 19, 2011, at 2:44 PM, Andre Polykanine wrote:
>
>> Hello Alex,
>>
>> Two (stupid?) questions:
>> 1. Why PHP_SELF is better than SCRIPT_NAME?
>> 2. Why strcmp() is better than just comparing?
>>
>> --
>> With best regards from Ukraine,
>> Andre
>> Skype: Francophile
>> My blog: http://oire.org/menelion (mostly in Russian)
>> Twitter: http://twitter.com/m_elensule
>> Facebook: http://facebook.com/menelion
>
>No idea about the first, and I've never used strcmp() before for an
>equality check. If there is something I'm missing I would love to
>know.
>
>Regards,
>
>-Josh
-Josh:
The function strcmp() simply evaluates two strings and reports back
-1, 0, or 1 depending upon their alphabetical relationship.
Cheers,
tedd
--
-------
http://sperling.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php