Posts: 159
Threads: 103
Joined: Apr 2017
Reputation:
0
Hi,
If i strcmp empty string it return as it match or no? because in sa-mp if you strcmp empty string it always give that is match?
Posts: 159
Threads: 103
Joined: Apr 2017
Reputation:
0
I know but i talk about php strcmp if i compare empty string with non empty it return that it matches or no? is there same bug as in samp strcmp ?
Posts: 506
Threads: 15
Joined: Mar 2009
Reputation:
0
Dude, just search for that php function on ****** and if you don't find what you want, it takes only a few seconds to test it yourself. You're going to learn a lot more when you find things yourself instead of other people telling you.
Posts: 3,004
Threads: 12
Joined: May 2011
If strcmp("", "") then yes.
Posts: 3,004
Threads: 12
Joined: May 2011
Quote:
Originally Posted by Freaksken
That's not what he means. He means this note from the wiki:
|
His other reply touched PHP.
Quote:
Originally Posted by Bussyman
I know but i talk about php strcmp if i compare empty string with non empty it return that it matches or no? is there same bug as in samp strcmp ?
|
Whether PHP strcmp function has the same issue that SAMP's strcmp has (the one you mentioned)
In terms of PHP, strcmp will return 0 (match)
(tested it before I replied)
EDIT:
Must also note that
PHP код:
echo strcmp("","bug"); // -3
PHP код:
echo strcmp("bug",""); // 3