NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Function (method: argument type declaration)


Joined: 05 May 2018
Posts: 33
Reply with quote
First of all I activated in script strict type: declare(strict_types=1);

I used int as argument type.

But strange type displayed by (phped) debugger: long.

How come ?

View user's profileFind all posts by gutapetruSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 7897
Reply with quote
int is an alias for long in php world:
Code:

typedef union _zend_value {
   zend_long         lval;            /* long value */
   double            dval;            /* double value */
   zend_refcounted  *counted;
   zend_string      *str;
   zend_array       *arr;
   zend_object      *obj;
   zend_resource    *res;
   zend_reference   *ref;
   zend_ast_ref     *ast;
   zval             *zv;
   void             *ptr;
   zend_class_entry *ce;
   zend_function    *func;
   struct {
      uint32_t w1;
      uint32_t w2;
   } ww;
} zend_value;

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 05 May 2018
Posts: 33
Reply with quote
Thanks !
View user's profileFind all posts by gutapetruSend private message
Function (method: argument type declaration)
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic