3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a{ public $res = 1; public function abc( int $d){ for ($x=1; $x<$d; $x++) $this->res = $this->res * $this->abc( $x); return $this->res; } } $a = new a(); echo $a->abc(10);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rsXY7
function name:  (null)
number of ops:  8
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $1      'a'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   13     3        INIT_METHOD_CALL                                         !0, 'abc'
          4        SEND_VAL_EX                                              10
          5        DO_FCALL                                      0  $4      
          6        ECHO                                                     $4
          7      > RETURN                                                   1

Class a:
Function abc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 3
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 3
Branch analysis from position: 13
Branch analysis from position: 3
filename:       /in/rsXY7
function name:  abc
number of ops:  16
compiled vars:  !0 = $d, !1 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        ASSIGN                                                   !1, 1
          2      > JMP                                                      ->11
    7     3    >   FETCH_OBJ_R                                      ~4      'res'
          4        INIT_METHOD_CALL                                         'abc'
          5        SEND_VAR_EX                                              !1
          6        DO_FCALL                                      0  $5      
          7        MUL                                              ~6      $5, ~4
          8        ASSIGN_OBJ                                               'res'
          9        OP_DATA                                                  ~6
    6    10        PRE_INC                                                  !1
         11    >   IS_SMALLER                                               !1, !0
         12      > JMPNZ                                                    ~8, ->3
    8    13    >   FETCH_OBJ_R                                      ~9      'res'
         14      > RETURN                                                   ~9
    9    15*     > RETURN                                                   null

End of function abc

End of class a.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.64 ms | 1395 KiB | 13 Q