3v4l.org

run code in 300+ PHP versions simultaneously
<?php class _Stringable { public $value; public function __construct($value) { $this->value = $value; } public function __toString() { return $this->value; } } class NonStringable { public $value; public function __construct($value) { $this->value = $value; } } $items = array( new _Stringable('A'), new _Stringable('B'), new NonStringable('C') ); asort($items); var_dump($items);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mM8b2
function name:  (null)
number of ops:  21
compiled vars:  !0 = $items
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            '_stringable'
   24     1        NEW                                              $1      '_Stringable'
          2        SEND_VAL_EX                                              'A'
          3        DO_FCALL                                      0          
          4        INIT_ARRAY                                       ~3      $1
   25     5        NEW                                              $4      '_Stringable'
          6        SEND_VAL_EX                                              'B'
          7        DO_FCALL                                      0          
          8        ADD_ARRAY_ELEMENT                                ~3      $4
   26     9        NEW                                              $6      'NonStringable'
         10        SEND_VAL_EX                                              'C'
         11        DO_FCALL                                      0          
         12        ADD_ARRAY_ELEMENT                                ~3      $6
   23    13        ASSIGN                                                   !0, ~3
   29    14        INIT_FCALL                                               'asort'
         15        SEND_REF                                                 !0
         16        DO_ICALL                                                 
   31    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !0
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Class _Stringable:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mM8b2
function name:  __construct
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        ASSIGN_OBJ                                               'value'
          2        OP_DATA                                                  !0
    8     3      > RETURN                                                   null

End of function __construct

Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mM8b2
function name:  __toString
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   FETCH_OBJ_R                                      ~0      'value'
          1        VERIFY_RETURN_TYPE                                       ~0
          2      > RETURN                                                   ~0
   12     3*       VERIFY_RETURN_TYPE                                       
          4*     > RETURN                                                   null

End of function __tostring

End of class _Stringable.

Class NonStringable:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mM8b2
function name:  __construct
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
   19     1        ASSIGN_OBJ                                               'value'
          2        OP_DATA                                                  !0
   20     3      > RETURN                                                   null

End of function __construct

End of class NonStringable.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.99 ms | 1400 KiB | 17 Q