3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array ( 1=>"a", 2=>"b", 3=>"c" ); $d = test($a); echo "d:<br />"; while(list($key, $val)=each($d)) { echo $val." "; } function test($a) { while(list($key, $val)=each($a)) { $a[$key] = $val . "t3"; } return $a; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 7
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 7
Branch analysis from position: 17
Branch analysis from position: 7
filename:       /in/L8GsZ
function name:  (null)
number of ops:  18
compiled vars:  !0 = $a, !1 = $d, !2 = $val, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    7     1        INIT_FCALL_BY_NAME                                       'test'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $5      
          4        ASSIGN                                                   !1, $5
    8     5        ECHO                                                     'd%3A%3Cbr+%2F%3E'
    9     6      > JMP                                                      ->9
   10     7    >   CONCAT                                           ~7      !2, '+'
          8        ECHO                                                     ~7
    9     9    >   INIT_FCALL_BY_NAME                                       'each'
         10        SEND_VAR_EX                                              !1
         11        DO_FCALL                                      0  $8      
         12        FETCH_LIST_R                                     $9      $8, 0
         13        ASSIGN                                                   !3, $9
         14        FETCH_LIST_R                                     $11     $8, 1
         15        ASSIGN                                                   !2, $11
         16      > JMPNZ                                                    $8, ->7
   19    17    > > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 2
Branch analysis from position: 13
Branch analysis from position: 2
filename:       /in/L8GsZ
function name:  test
number of ops:  15
compiled vars:  !0 = $a, !1 = $key, !2 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   14     1      > JMP                                                      ->5
   15     2    >   CONCAT                                           ~4      !2, 't3'
          3        ASSIGN_DIM                                               !0, !1
          4        OP_DATA                                                  ~4
   14     5    >   INIT_FCALL_BY_NAME                                       'each'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0  $5      
          8        FETCH_LIST_R                                     $6      $5, 0
          9        ASSIGN                                                   !1, $6
         10        FETCH_LIST_R                                     $8      $5, 1
         11        ASSIGN                                                   !2, $8
         12      > JMPNZ                                                    $5, ->2
   18    13    > > RETURN                                                   !0
   19    14*     > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.76 ms | 1403 KiB | 13 Q