3v4l.org

run code in 300+ PHP versions simultaneously
<?php $profile = [ 'person' => [ 'name' => 'Jim DeLois', 'address' => [ 'street' => '400 Central Park West', 'citiy' => 'New York', 'state' => 'NY', 'zip' => 10025 ], 'pets' => [] ] ]; $cast_recursive = function ( $element ) use ( &$cast_recursive ) { return is_array( $element ) ? (object) array_map( $cast_recursive, $element ) : $element; }; // map_recursive var_dump( $cast_recursive( $profile ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VdNGK
function name:  (null)
number of ops:  11
compiled vars:  !0 = $profile, !1 = $cast_recursive
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   16     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FVdNGK%3A16%240'
          2        BIND_LEXICAL                                             ~3, !1
          3        ASSIGN                                                   !1, ~3
   20     4        INIT_FCALL                                               'var_dump'
          5        INIT_DYNAMIC_CALL                                        !1
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0  $5      
          8        SEND_VAR                                                 $5
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FVdNGK%3A16%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VdNGK
function name:  {closure}
number of ops:  14
compiled vars:  !0 = $element, !1 = $cast_recursive
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
   17     2        TYPE_CHECK                                  128          !0
          3      > JMPZ                                                     ~2, ->11
          4    >   INIT_FCALL                                               'array_map'
          5        SEND_VAR                                                 !1
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $3      
          8        CAST                                          8  ~4      $3
          9        QM_ASSIGN                                        ~5      ~4
         10      > JMP                                                      ->12
         11    >   QM_ASSIGN                                        ~5      !0
         12    > > RETURN                                                   ~5
   18    13*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FVdNGK%3A16%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.06 ms | 1396 KiB | 17 Q