3v4l.org

run code in 300+ PHP versions simultaneously
<?php class myclass{ public static $i = 0; public function one($called_from = null){ $this->three($called_from); self::$i += 1; echo self::$i; } public function two(){ return one(__FUNCTION__); } public function three($called_from){ if ( $called_from != 'two'){ return $this->two(); } } } $obj = new myclass; $obj->one();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6jkIm
function name:  (null)
number of ops:  6
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   NEW                                              $1      'myclass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   26     3        INIT_METHOD_CALL                                         !0, 'one'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class myclass:
Function one:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6jkIm
function name:  one
number of ops:  9
compiled vars:  !0 = $called_from
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV_INIT                                        !0      null
    8     1        INIT_METHOD_CALL                                         'three'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
    9     4        ASSIGN_STATIC_PROP_OP                         1          'i'
          5        OP_DATA                                                  1
   10     6        FETCH_STATIC_PROP_R          unknown             ~3      'i'
          7        ECHO                                                     ~3
   11     8      > RETURN                                                   null

End of function one

Function two:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6jkIm
function name:  two
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL_BY_NAME                                       'one'
          1        SEND_VAL_EX                                              'two'
          2        DO_FCALL                                      0  $0      
          3      > RETURN                                                   $0
   15     4*     > RETURN                                                   null

End of function two

Function three:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6jkIm
function name:  three
number of ops:  7
compiled vars:  !0 = $called_from
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
   18     1        IS_NOT_EQUAL                                             !0, 'two'
          2      > JMPZ                                                     ~1, ->6
   19     3    >   INIT_METHOD_CALL                                         'two'
          4        DO_FCALL                                      0  $2      
          5      > RETURN                                                   $2
   21     6    > > RETURN                                                   null

End of function three

End of class myclass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.08 ms | 1395 KiB | 13 Q