3v4l.org

run code in 300+ PHP versions simultaneously
<?php function my_other_function($d) { return $d; } function my_function($data) { foreach ($data as $info) { $new_info = my_other_function($info); $new_data[] = $new_info; } print_r($new_data); return $new_data; } $data = array('7245'); echo 'test1'; // prints out test1 $new_data = my_function($data); echo 'test2'; // prints out test2 print_r($new_data); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5uYSY
function name:  (null)
number of ops:  11
compiled vars:  !0 = $data, !1 = $new_data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   ASSIGN                                                   !0, <array>
   17     1        ECHO                                                     'test1'
   18     2        INIT_FCALL                                               'my_function'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $3      
          5        ASSIGN                                                   !1, $3
   19     6        ECHO                                                     'test2'
   20     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
   21    10      > RETURN                                                   1

Function my_other_function:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5uYSY
function name:  my_other_function
number of ops:  3
compiled vars:  !0 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1      > RETURN                                                   !0
    5     2*     > RETURN                                                   null

End of function my_other_function

Function my_function:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 10
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 10
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/5uYSY
function name:  my_function
number of ops:  16
compiled vars:  !0 = $data, !1 = $info, !2 = $new_info, !3 = $new_data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1      > FE_RESET_R                                       $4      !0, ->10
          2    > > FE_FETCH_R                                               $4, !1, ->10
    9     3    >   INIT_FCALL                                               'my_other_function'
          4        SEND_VAR                                                 !1
          5        DO_FCALL                                      0  $5      
          6        ASSIGN                                                   !2, $5
   10     7        ASSIGN_DIM                                               !3
          8        OP_DATA                                                  !2
    8     9      > JMP                                                      ->2
         10    >   FE_FREE                                                  $4
   12    11        INIT_FCALL                                               'print_r'
         12        SEND_VAR                                                 !3
         13        DO_ICALL                                                 
   13    14      > RETURN                                                   !3
   14    15*     > RETURN                                                   null

End of function my_function

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.46 ms | 1403 KiB | 17 Q