3v4l.org

run code in 300+ PHP versions simultaneously
<?php function objectToArray( $d ) { if (is_object($d)) { $d = get_object_vars($d); } if (is_array($d)) { return array_map(__FUNCTION__, $d); } else { return $d; } } var_dump(objectToArray(NULL)); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FAVRV
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'objecttoarray'
          2        SEND_VAL                                                 null
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
   16     6      > RETURN                                                   1

Function objecttoarray:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/FAVRV
function name:  objectToArray
number of ops:  17
compiled vars:  !0 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        TYPE_CHECK                                  256          !0
          2      > JMPZ                                                     ~1, ->7
    5     3    >   INIT_FCALL                                               'get_object_vars'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        ASSIGN                                                   !0, $2
    8     7    >   TYPE_CHECK                                  128          !0
          8      > JMPZ                                                     ~4, ->15
    9     9    >   INIT_FCALL                                               'array_map'
         10        SEND_VAL                                                 'objectToArray'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $5      
         13      > RETURN                                                   $5
         14*       JMP                                                      ->16
   11    15    > > RETURN                                                   !0
   13    16*     > RETURN                                                   null

End of function objecttoarray

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.77 ms | 1398 KiB | 20 Q