3v4l.org

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

Class myclass:
Function add:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FjYRk
function name:  add
number of ops:  5
compiled vars:  !0 = $nam, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        ADD                                              ~2      !0, !1
          3      > RETURN                                                   ~2
          4*     > RETURN                                                   null

End of function add

Function mult:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FjYRk
function name:  mult
number of ops:  5
compiled vars:  !0 = $nam, !1 = $y
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    9     2        MUL                                              ~2      !0, !1
          3      > RETURN                                                   ~2
          4*     > RETURN                                                   null

End of function mult

End of class myclass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.93 ms | 1394 KiB | 13 Q