Jump to content
MakeWebGames

Question about Switch/Case.


Guest Drizzle

Recommended Posts

Quote from the PHP-MANUAL

PHP Function List

Sorry, but the function key_exists is not in the online manual. Perhaps you misspelled it, or it is a relatively new function that hasn't made it into the online documentation yet. The following are the 20 functions which seem to be closest in spelling to key_exists (really good matches are in bold). Perhaps you were looking for one of these:

Now, get your facts straight you retard. You tell me to RTFM? Wow, looks like you will need to RTFM!

Link to comment
Share on other sites

Quote from php manual

[2001-12-31 14:21 UTC] [email protected]

Hi Mike,

Unless one of the developers objects, I will add the alias

- however, if the change is made, it would not show up

'til the next release.

I would recommend that you modify your files anyway. It is

a small amount of work using gawk or vim. :)

Alternately, you can modify your local copy of PHP until

next release.

Add the following line to ext/standard/basic_functions.c:

PHP_FALIAS(key_exists, array_key_exists, NULL)

The line should go after the line that looks like:

PHP_FE(array_key_exists, NULL)

Once you have made the change and saved, recompile PHP.

Well im still right your wrong, they renamed it, you didn't even know your self for one, thats why you told me to look up.. So.. shh :D

Link to comment
Share on other sites

Ok, This isn't a valid PHP Function, It's an alias off Array_key_exist, So this is one off them cases where everyone was actually right, Spud was right the script will run, However we was right as it isn't a PHP Function, And I've read on two site's that it isn't going to be kept as an alias, Infact some people have issue's with it on PHP5.

 

Sorry Spud, However we was still kinda right lol

Link to comment
Share on other sites

Stop quoting ten year old stuff.

2001 was the time of PHP 4.1.0, again... RTFM.

That's all there is to quote because key_exists hasn't officially existed since 4.0. It was renamed and the php manual barely makes a reference to the old name. An alias of the function was kept because it caused incompatibilities but I'm sure it will be removed eventually (php 6).

tldr; the function exists, but only for legacy purposes so you shouldn't be using it at all unless you're working on code that's over ten years old.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...