3v4l.org

run code in 300+ PHP versions simultaneously
<?php class StringableObject { public function __toString(): string { return 'string'; } } $stringable = array_count_values([new StringableObject(), new stdclass]); var_dump($stringable);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/07vKm
function name:  (null)
number of ops:  15
compiled vars:  !0 = $stringable
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'stringableobject'
   13     1        INIT_FCALL                                               'array_count_values'
          2        NEW                                              $1      'StringableObject'
          3        DO_FCALL                                      0          
          4        INIT_ARRAY                                       ~3      $1
          5        NEW                                              $4      'stdclass'
          6        DO_FCALL                                      0          
          7        ADD_ARRAY_ELEMENT                                ~3      $4
          8        SEND_VAL                                                 ~3
          9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !0, $6
   15    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Class StringableObject:
Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/07vKm
function name:  __toString
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E > > RETURN                                                   'string'
    9     1*       VERIFY_RETURN_TYPE                                       
          2*     > RETURN                                                   null

End of function __tostring

End of class StringableObject.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.75 ms | 1005 KiB | 15 Q