3v4l.org

run code in 300+ PHP versions simultaneously
<?php $f = function($x) use($f){ if($x==0 || $x==1) return 1; return $f($x-1) + $f($x-2); }; print $f(10);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cO2ER
function name:  (null)
number of ops:  8
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FcO2ER%3A3%240'
          1        BIND_LEXICAL                                             ~1, !0
          2        ASSIGN                                                   !0, ~1
    9     3        INIT_DYNAMIC_CALL                                        !0
          4        SEND_VAL_EX                                              10
          5        DO_FCALL                                      0  $3      
          6        ECHO                                                     $3
          7      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FcO2ER%3A3%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/cO2ER
function name:  {closure}
number of ops:  19
compiled vars:  !0 = $x, !1 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
    4     2        IS_EQUAL                                         ~2      !0, 0
          3      > JMPNZ_EX                                         ~2      ~2, ->6
          4    >   IS_EQUAL                                         ~3      !0, 1
          5        BOOL                                             ~2      ~3
          6    > > JMPZ                                                     ~2, ->8
    5     7    > > RETURN                                                   1
    6     8    >   INIT_DYNAMIC_CALL                                        !1
          9        SUB                                              ~4      !0, 1
         10        SEND_VAL_EX                                              ~4
         11        DO_FCALL                                      0  $5      
         12        INIT_DYNAMIC_CALL                                        !1
         13        SUB                                              ~6      !0, 2
         14        SEND_VAL_EX                                              ~6
         15        DO_FCALL                                      0  $7      
         16        ADD                                              ~8      $5, $7
         17      > RETURN                                                   ~8
    7    18*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FcO2ER%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.66 ms | 1395 KiB | 13 Q