3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test_1($arg_1, $arg_2) { return $arg_1 + $arg_2; } $a = 1; $b = 2; $result = test_1($a, $b); echo $result; $test_array = [1,3,5,7]; foreach($test_array as &$var){ $result_1 = $var; $result_2 = &$result_1; $result_2 = $var + 1; echo 'result_1 = '.$result_1.' var = '.$var."\n\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 10, Position 2 = 21
Branch analysis from position: 10
2 jumps found. (Code = 126) Position 1 = 11, Position 2 = 21
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/pDv8K
function name:  (null)
number of ops:  23
compiled vars:  !0 = $a, !1 = $b, !2 = $result, !3 = $test_array, !4 = $var, !5 = $result_1, !6 = $result_2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, 1
    7     1        ASSIGN                                                   !1, 2
    8     2        INIT_FCALL                                               'test_1'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_FCALL                                      0  $9      
          6        ASSIGN                                                   !2, $9
    9     7        ECHO                                                     !2
   10     8        ASSIGN                                                   !3, <array>
   11     9      > FE_RESET_RW                                      $12     !3, ->21
         10    > > FE_FETCH_RW                                              $12, !4, ->21
   12    11    >   ASSIGN                                                   !5, !4
   13    12        ASSIGN_REF                                               !6, !5
   14    13        ADD                                              ~15     !4, 1
         14        ASSIGN                                                   !6, ~15
   15    15        CONCAT                                           ~17     'result_1+%3D+', !5
         16        CONCAT                                           ~18     ~17, '+var+%3D+'
         17        CONCAT                                           ~19     ~18, !4
         18        CONCAT                                           ~20     ~19, '%0A%0A'
         19        ECHO                                                     ~20
   11    20      > JMP                                                      ->10
         21    >   FE_FREE                                                  $12
   16    22      > RETURN                                                   1

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

End of function test_1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.29 ms | 1390 KiB | 14 Q