3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo 'go forrest'; function recursiveFunction($value = 100) { if ($value % 2 < 2) { return $value; } return recursiveFunction($value % 2); } echo recursiveFunction(); echo 'stop forrest';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qtVq1
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ECHO                                                     'go+forrest'
   10     1        INIT_FCALL                                               'recursivefunction'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
   11     4        ECHO                                                     'stop+forrest'
          5      > RETURN                                                   1

Function recursivefunction:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qtVq1
function name:  recursiveFunction
number of ops:  11
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV_INIT                                        !0      100
    5     1        MOD                                              ~1      !0, 2
          2        IS_SMALLER                                               ~1, 2
          3      > JMPZ                                                     ~2, ->5
    6     4    > > RETURN                                                   !0
    8     5    >   INIT_FCALL_BY_NAME                                       'recursiveFunction'
          6        MOD                                              ~3      !0, 2
          7        SEND_VAL_EX                                              ~3
          8        DO_FCALL                                      0  $4      
          9      > RETURN                                                   $4
    9    10*     > RETURN                                                   null

End of function recursivefunction

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
396.69 ms | 1397 KiB | 15 Q