Re: [phpng] naming

From: Date: Thu, 08 May 2014 18:20:58 +0000
Subject: Re: [phpng] naming
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-74067@lists.php.net to get a copy of this message
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.
-- Andrea Faulds http://ajf.me/


Thread (11 messages)

« previous php.internals (#74067) next »