3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dataset = array("a" => "one", "b" => "two", "c" => "three"); var_dump($dataset, var_dump(current($dataset))); print(PHP_EOL); function foo($a, $b) { return false; } foreach($dataset as $key => $val) { $dataset[$key] = foo($val, 'bar'); var_dump($dataset[$key], $key, $val, current($dataset)); print(PHP_EOL); } var_dump($dataset); print(PHP_EOL);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 33
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 33
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
filename:       /in/b2PB7
function name:  (null)
number of ops:  39
compiled vars:  !0 = $dataset, !1 = $val, !2 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        INIT_FCALL                                               'var_dump'
          4        INIT_FCALL                                               'current'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                         $5      
          9        SEND_VAR                                                 $5
         10        DO_ICALL                                                 
    6    11        ECHO                                                     '%0A'
   12    12      > FE_RESET_R                                       $7      !0, ->33
         13    > > FE_FETCH_R                                       ~8      $7, !1, ->33
         14    >   ASSIGN                                                   !2, ~8
   13    15        INIT_FCALL                                               'foo'
         16        SEND_VAR                                                 !1
         17        SEND_VAL                                                 'bar'
         18        DO_FCALL                                      0  $11     
         19        ASSIGN_DIM                                               !0, !2
         20        OP_DATA                                                  $11
   14    21        INIT_FCALL                                               'var_dump'
         22        FETCH_DIM_R                                      ~12     !0, !2
         23        SEND_VAL                                                 ~12
         24        SEND_VAR                                                 !2
         25        SEND_VAR                                                 !1
         26        INIT_FCALL                                               'current'
         27        SEND_VAR                                                 !0
         28        DO_ICALL                                         $13     
         29        SEND_VAR                                                 $13
         30        DO_ICALL                                                 
   15    31        ECHO                                                     '%0A'
   12    32      > JMP                                                      ->13
         33    >   FE_FREE                                                  $7
   18    34        INIT_FCALL                                               'var_dump'
         35        SEND_VAR                                                 !0
         36        DO_ICALL                                                 
   20    37        ECHO                                                     '%0A'
         38      > RETURN                                                   1

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

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.94 ms | 943 KiB | 19 Q