3v4l.org

run code in 300+ PHP versions simultaneously
<?php $inc = 2; recv(5); function recv($v) { global $inc; if ($v >= 1) { echo $inc * $v . " "; $v--; $s = $s + $inc * $v; recv($v); } } echo "The sum is $s"; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WkgQL
function name:  (null)
number of ops:  8
compiled vars:  !0 = $inc, !1 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 2
    3     1        INIT_FCALL_BY_NAME                                       'recv'
          2        SEND_VAL_EX                                              5
          3        DO_FCALL                                      0          
   23     4        NOP                                                      
          5        FAST_CONCAT                                      ~4      'The+sum+is+', !1
          6        ECHO                                                     ~4
   24     7      > RETURN                                                   1

Function recv:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 14
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/WkgQL
function name:  recv
number of ops:  15
compiled vars:  !0 = $v, !1 = $inc, !2 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        BIND_GLOBAL                                              !1, 'inc'
    8     2        IS_SMALLER_OR_EQUAL                                      1, !0
          3      > JMPZ                                                     ~3, ->14
    9     4    >   MUL                                              ~4      !1, !0
          5        CONCAT                                           ~5      ~4, '+'
          6        ECHO                                                     ~5
   11     7        PRE_DEC                                                  !0
   12     8        MUL                                              ~7      !1, !0
          9        ADD                                              ~8      !2, ~7
         10        ASSIGN                                                   !2, ~8
   14    11        INIT_FCALL_BY_NAME                                       'recv'
         12        SEND_VAR_EX                                              !0
         13        DO_FCALL                                      0          
   20    14    > > RETURN                                                   null

End of function recv

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.59 ms | 1394 KiB | 13 Q