Re: [phpng] naming
On 07.05.2014 19:59, Andrea Faulds wrote:
On 7 May 2014, at 18:57, Marc Bennewitz <php@marc-bennewitz.de
<
mailto:php@marc-bennewitz.de>> wrote:
I would also prefer to name it was it represents. I mean a ZVAL
represents a PHP typed value and not a C typed one. So for example
IS_LONG would be IS_INTEGER and IS_DOUBLE would become IS_FLOAT.
However, integers in PHP are usually abbreviated to just “int”s, so I
think that one should be IS_INT. :)
After looking something deeper into documentation/code I'm really unsure what the PHP integer type is named.
- The documentation is talking about "integer" mostly but on some points it's talking about "int" also.
- http://php.net/manual/language.types.integer.php
- On documented function arguments and return values it's named "int"
- Type-Functions are named "int" but the type is named "integer" mainly
- is_int (alias is_integer and is_long)
- intval
- gettype returns "integer"
- settype expects "integer" or, since PHP 4.2.0, "int"
- Constants use the abbr. "INT"
- PHP_INT_MAX
- PHP_INT_SIZE
- On type casting both exists I don't know if one is an alias
- http://php.net/manual/language.types.type-juggling.php#language.types.typecasting
- None of the both are reserved words
PS: With "boolean" and "bool" it's the same mix.
Thread (11 messages)