3v4l.org

run code in 300+ PHP versions simultaneously
<?php function objectToArray( $object ) { if( !is_object( $object ) && !is_array( $object ) ) { return $object; } if( is_object( $object ) ) { $object = get_object_vars( $object ); } return array_map( 'objectToArray', $object ); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/IN0ib
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E > > RETURN                                                   1

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

End of function objecttoarray

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.38 ms | 1395 KiB | 17 Q