3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = new \stdClass; $b = new \stdClass; $c = new \stdClass; $a->data = 123; $a->setter = "Abu"; $b->content = [$a, $a]; $b->data = '123'; $c->createdAt = '2017-01-01 12:00:00'; $c->payload = $b; var_dump($c); $transform = function(&$element) { if (is_array($element)) { transform($element); } }; foreach ($c as $element) { transform($element); } array_walk_recursive($c, $callback);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 29, Position 2 = 34
Branch analysis from position: 29
2 jumps found. (Code = 78) Position 1 = 30, Position 2 = 34
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
filename:       /in/pmm4o
function name:  (null)
number of ops:  40
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $transform, !4 = $element, !5 = $callback
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $6      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $6
    4     3        NEW                                              $9      'stdClass'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $9
    5     6        NEW                                              $12     'stdClass'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !2, $12
    7     9        ASSIGN_OBJ                                               !0, 'data'
         10        OP_DATA                                                  123
    8    11        ASSIGN_OBJ                                               !0, 'setter'
         12        OP_DATA                                                  'Abu'
   10    13        INIT_ARRAY                                       ~18     !0
         14        ADD_ARRAY_ELEMENT                                ~18     !0
         15        ASSIGN_OBJ                                               !1, 'content'
         16        OP_DATA                                                  ~18
   11    17        ASSIGN_OBJ                                               !1, 'data'
         18        OP_DATA                                                  '123'
   13    19        ASSIGN_OBJ                                               !2, 'createdAt'
         20        OP_DATA                                                  '2017-01-01+12%3A00%3A00'
   14    21        ASSIGN_OBJ                                               !2, 'payload'
         22        OP_DATA                                                  !1
   16    23        INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !2
         25        DO_ICALL                                                 
   18    26        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2Fpmm4o%3A18%240'
         27        ASSIGN                                                   !3, ~23
   24    28      > FE_RESET_R                                       $25     !2, ->34
         29    > > FE_FETCH_R                                               $25, !4, ->34
   25    30    >   INIT_FCALL_BY_NAME                                       'transform'
         31        SEND_VAR_EX                                              !4
         32        DO_FCALL                                      0          
   24    33      > JMP                                                      ->29
         34    >   FE_FREE                                                  $25
   28    35        INIT_FCALL                                               'array_walk_recursive'
         36        SEND_REF                                                 !2
         37        SEND_VAR                                                 !5
         38        DO_ICALL                                                 
         39      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2Fpmm4o%3A18%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/pmm4o
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $element
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
   19     1        TYPE_CHECK                                  128          !0
          2      > JMPZ                                                     ~1, ->6
   20     3    >   INIT_FCALL_BY_NAME                                       'transform'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
   22     6    > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2Fpmm4o%3A18%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.87 ms | 1405 KiB | 17 Q