3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface MakeMeCMS_Listener_interface { public function __construct($method, $args); public function setFeedback($arg, $type); } class MakeMeCMS_Listener implements MakeMeCMS_Listener_interface { private $_feedback; private $_type; public function __construct($method, $args) { if(method_exists($this, $method)) { if($args != '') { if(preg_match('#\,#', $args)) { $args = explode(',', $args); } $this->$method($args); } else { $this->$method(); } } } public function setFeedback($arg,$type) { $this->_feedback = $arg; $this->_type = $type; } public function feedback() { return $this->_feedback; } private function test(array $args) { $string = ''; foreach($args as $arg) { $string .= $arg.' '; } $this->setFeedback($string, 'text/plain'); } } class myAddon_Listener extends MakeMeCMS_Listener implements MakeMeCMS_Listener_interface { public function __construct($method, $args) { } public function setFeedback($arg, $type) { parent::setFeedback($arg, $type); } private function test2() { echo('Hello World!'); } } $listener = new MakeMeCMS_Listener('test', 'foo,bar'); echo($listener->feedback());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VHRoK
function name:  (null)
number of ops:  11
compiled vars:  !0 = $listener
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   DECLARE_CLASS                                            'makemecms_listener'
   37     1        DECLARE_CLASS                                            'myaddon_listener', 'makemecms_listener'
   48     2        NEW                                              $1      'MakeMeCMS_Listener'
          3        SEND_VAL_EX                                              'test'
          4        SEND_VAL_EX                                              'foo%2Cbar'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $1
   49     7        INIT_METHOD_CALL                                         !0, 'feedback'
          8        DO_FCALL                                      0  $4      
          9        ECHO                                                     $4
         10      > RETURN                                                   1

Class MakeMeCMS_Listener_interface:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VHRoK
function name:  __construct
number of ops:  3
compiled vars:  !0 = $method, !1 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2      > RETURN                                                   null

End of function __construct

Function setfeedback:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VHRoK
function name:  setFeedback
number of ops:  3
compiled vars:  !0 = $arg, !1 = $type
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2      > RETURN                                                   null

End of function setfeedback

End of class MakeMeCMS_Listener_interface.

Class MakeMeCMS_Listener:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 26
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 24
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 20
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/VHRoK
function name:  __construct
number of ops:  27
compiled vars:  !0 = $method, !1 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   10     2        INIT_FCALL                                               'method_exists'
          3        FETCH_THIS                                       ~2      
          4        SEND_VAL                                                 ~2
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $3      
          7      > JMPZ                                                     $3, ->26
   11     8    >   IS_NOT_EQUAL                                             !1, ''
          9      > JMPZ                                                     ~4, ->24
   12    10    >   INIT_FCALL                                               'preg_match'
         11        SEND_VAL                                                 '%23%5C%2C%23'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $5      
         14      > JMPZ                                                     $5, ->20
   13    15    >   INIT_FCALL                                               'explode'
         16        SEND_VAL                                                 '%2C'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                         $6      
         19        ASSIGN                                                   !1, $6
   15    20    >   INIT_METHOD_CALL                                         !0
         21        SEND_VAR_EX                                              !1
         22        DO_FCALL                                      0          
         23      > JMP                                                      ->26
   18    24    >   INIT_METHOD_CALL                                         !0
         25        DO_FCALL                                      0          
   21    26    > > RETURN                                                   null

End of function __construct

Function setfeedback:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VHRoK
function name:  setFeedback
number of ops:  7
compiled vars:  !0 = $arg, !1 = $type
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   23     2        ASSIGN_OBJ                                               '_feedback'
          3        OP_DATA                                                  !0
   24     4        ASSIGN_OBJ                                               '_type'
          5        OP_DATA                                                  !1
   25     6      > RETURN                                                   null

End of function setfeedback

Function feedback:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VHRoK
function name:  feedback
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   FETCH_OBJ_R                                      ~0      '_feedback'
          1      > RETURN                                                   ~0
   28     2*     > RETURN                                                   null

End of function feedback

Function test:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/VHRoK
function name:  test
number of ops:  13
compiled vars:  !0 = $args, !1 = $string, !2 = $arg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   RECV                                             !0      
   30     1        ASSIGN                                                   !1, ''
   31     2      > FE_RESET_R                                       $4      !0, ->7
          3    > > FE_FETCH_R                                               $4, !2, ->7
   32     4    >   CONCAT                                           ~5      !2, '+'
          5        ASSIGN_OP                                     8          !1, ~5
   31     6      > JMP                                                      ->3
          7    >   FE_FREE                                                  $4
   34     8        INIT_METHOD_CALL                                         'setFeedback'
          9        SEND_VAR_EX                                              !1
         10        SEND_VAL_EX                                              'text%2Fplain'
         11        DO_FCALL                                      0          
   35    12      > RETURN                                                   null

End of function test

End of class MakeMeCMS_Listener.

Class myAddon_Listener:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VHRoK
function name:  __construct
number of ops:  3
compiled vars:  !0 = $method, !1 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   38     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   40     2      > RETURN                                                   null

End of function __construct

Function setfeedback:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VHRoK
function name:  setFeedback
number of ops:  7
compiled vars:  !0 = $arg, !1 = $type
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   41     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   42     2        INIT_STATIC_METHOD_CALL                                  'setFeedback'
          3        SEND_VAR_EX                                              !0
          4        SEND_VAR_EX                                              !1
          5        DO_FCALL                                      0          
   43     6      > RETURN                                                   null

End of function setfeedback

Function test2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VHRoK
function name:  test2
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   45     0  E >   ECHO                                                     'Hello+World%21'
   46     1      > RETURN                                                   null

End of function test2

End of class myAddon_Listener.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.62 ms | 1404 KiB | 19 Q