PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Seznam typů prostředků> <Seznam aliasů funkcí
Last updated: Sat, 24 Mar 2007

view this page in

Příloha L. Seznam vyhrazených slov

Toto je seznam vyhrazených slov PHP, obvykle konstant a předdefinovaných proměnných. Nenajdete zde žádné funkce, což však neplatí pro jazykové konstrukty. Uvedenými názvy byste se neměli pokoušet nazývat proměnné, funkce, konstanty nebo metody, vedlo by to spolehlivě ke zmatku.

and E_PARSE old_function
$argv E_ERROR or
as E_WARNING parent
$argc eval PHP_OS
break exit() $PHP_SELF
case extends PHP_VERSION
cfunction FALSE print()
class for require()
continue foreach require_once()
declare function return()
default $HTTP_COOKIE_VARS static
do $HTTP_GET_VARS switch
die() $HTTP_POST_VARS stdClass
echo() $HTTP_POST_FILES $this
else $HTTP_ENV_VARS TRUE
elseif $HTTP_SERVER_VARS var
empty() if xor
enddeclare include() virtual()
endfor include_once() while
endforeach global __FILE__
endif list() __LINE__
endswitch new __sleep
endwhile not __wakeup
E_ALL NULL  



Seznam typů prostředků> <Seznam aliasů funkcí
Last updated: Sat, 24 Mar 2007
 
add a note add a note User Contributed Notes
Seznam vyhrazených slov
SR
04-Oct-2007 10:53
[Editorial note: parent and self are reserved class names. Functions and constants with their names can be declared, but not userspace classes]

true, false and null are not listed because they are globally-defined constants, not reserved words.

No idea about parent or self, though.
londonx at gmail dot com
05-Mar-2007 02:14
Naming a PHP5 class "variant" (with a constructor called the same) and then making an instance of it using __autoload triggers an error which disappears as soon as the name is changed. This should mean that "variant" is also a reserved word.
01-Nov-2006 04:42
Two things:

1. It would be nice for this list to differentiate those reserved words, which are language constructs used *with* parentheses (isset, unset, empty, eval, exit, die, ...) and those rather to be used *without* parentheses (all includes, echo, print, return, ...?)

This would really help define some common coding styles...

2. Do you write NULL, TRUE, FALSE or null, true, false? (I find CAPITAL letters better, however typing them can be annoying so I stick with using all lowercase letters, but what's the standard?)
10-Jan-2006 03:41
I don't see the boolean constants 'true' and 'false' listed among the reserved words/keywords/constants.

Seznam typů prostředků> <Seznam aliasů funkcí
Last updated: Sat, 24 Mar 2007
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites