3v4l.org

run code in 300+ PHP versions simultaneously
<?php class First { public $foo = 5; public function ffunc(){ $bar = $this->$foo + 3; return $bar; } } $res = First(); echo $res->ffunc();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nbscl
function name:  (null)
number of ops:  7
compiled vars:  !0 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL_BY_NAME                                       'First'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   15     3        INIT_METHOD_CALL                                         !0, 'ffunc'
          4        DO_FCALL                                      0  $3      
          5        ECHO                                                     $3
          6      > RETURN                                                   1

Class First:
Function ffunc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nbscl
function name:  ffunc
number of ops:  5
compiled vars:  !0 = $bar, !1 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_OBJ_R                                      ~2      !1
          1        ADD                                              ~3      ~2, 3
          2        ASSIGN                                                   !0, ~3
    9     3      > RETURN                                                   !0
   10     4*     > RETURN                                                   null

End of function ffunc

End of class First.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.84 ms | 1384 KiB | 13 Q