3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dataset = array("a" > "one", "b" > "two", "c" => "three"); function foo($a, $b) { return $a . $b; } foreach($dataset as $key => $val) { $dataset[$key] = foo($val, 'bar'); var_dump($dataset[$key], $key, $val); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 17
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 17
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/AkgVY
function name:  (null)
number of ops:  19
compiled vars:  !0 = $dataset, !1 = $val, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    8     1      > FE_RESET_R                                       $4      !0, ->17
          2    > > FE_FETCH_R                                       ~5      $4, !1, ->17
          3    >   ASSIGN                                                   !2, ~5
    9     4        INIT_FCALL                                               'foo'
          5        SEND_VAR                                                 !1
          6        SEND_VAL                                                 'bar'
          7        DO_FCALL                                      0  $8      
          8        ASSIGN_DIM                                               !0, !2
          9        OP_DATA                                                  $8
   10    10        INIT_FCALL                                               'var_dump'
         11        FETCH_DIM_R                                      ~9      !0, !2
         12        SEND_VAL                                                 ~9
         13        SEND_VAR                                                 !2
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                                 
    8    16      > JMP                                                      ->2
         17    >   FE_FREE                                                  $4
   11    18      > RETURN                                                   1

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

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.89 ms | 1398 KiB | 16 Q