3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class messageDetail { abstract function filter($msg); } class setmessage extends messageDetail { public function filter($msg) { return $msg; } } class messageHandle extends messageDetail { public $message; public $obj; public function __construct($obj) { $this -> obj = $obj; } public function filter($msg) { $this -> message = $msg; } } class htmlFilter extends messageHandle { public function filter($msg) { parent::filter($msg); return 'html过滤'. $this->$obj->filter($msg); } } class ensitiveFilter extends messageHandle { public function filter($msg) { parent::filter($msg); return '敏感词汇过滤'.$this->message; } } $obj = new htmlFilter(new ensitiveFilter(new setmessage())); echo $obj -> filter('测试一下');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GEn5n
function name:  (null)
number of ops:  14
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   48     0  E >   NEW                                              $1      'htmlFilter'
          1        NEW                                              $2      'ensitiveFilter'
          2        NEW                                              $3      'setmessage'
          3        DO_FCALL                                      0          
          4        SEND_VAR_NO_REF_EX                                       $3
          5        DO_FCALL                                      0          
          6        SEND_VAR_NO_REF_EX                                       $2
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !0, $1
   49     9        INIT_METHOD_CALL                                         !0, 'filter'
         10        SEND_VAL_EX                                              '%E6%B5%8B%E8%AF%95%E4%B8%80%E4%B8%8B'
         11        DO_FCALL                                      0  $8      
         12        ECHO                                                     $8
         13      > RETURN                                                   1

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

End of function filter

End of class messageDetail.

Class setmessage:
Function filter:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GEn5n
function name:  filter
number of ops:  3
compiled vars:  !0 = $msg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   11     1      > RETURN                                                   !0
   12     2*     > RETURN                                                   null

End of function filter

End of class setmessage.

Class messageHandle:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GEn5n
function name:  __construct
number of ops:  4
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
   21     1        ASSIGN_OBJ                                               'obj'
          2        OP_DATA                                                  !0
   22     3      > RETURN                                                   null

End of function __construct

Function filter:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GEn5n
function name:  filter
number of ops:  4
compiled vars:  !0 = $msg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   RECV                                             !0      
   26     1        ASSIGN_OBJ                                               'message'
          2        OP_DATA                                                  !0
   27     3      > RETURN                                                   null

End of function filter

End of class messageHandle.

Class htmlFilter:
Function filter:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GEn5n
function name:  filter
number of ops:  11
compiled vars:  !0 = $msg, !1 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   RECV                                             !0      
   34     1        INIT_STATIC_METHOD_CALL                                  'filter'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
   35     4        FETCH_OBJ_R                                      ~3      !1
          5        INIT_METHOD_CALL                                         ~3, 'filter'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0  $4      
          8        CONCAT                                           ~5      'html%E8%BF%87%E6%BB%A4', $4
          9      > RETURN                                                   ~5
   36    10*     > RETURN                                                   null

End of function filter

Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GEn5n
function name:  __construct
number of ops:  4
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
   21     1        ASSIGN_OBJ                                               'obj'
          2        OP_DATA                                                  !0
   22     3      > RETURN                                                   null

End of function __construct

End of class htmlFilter.

Class ensitiveFilter:
Function filter:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GEn5n
function name:  filter
number of ops:  8
compiled vars:  !0 = $msg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   41     0  E >   RECV                                             !0      
   43     1        INIT_STATIC_METHOD_CALL                                  'filter'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
   44     4        FETCH_OBJ_R                                      ~2      'message'
          5        CONCAT                                           ~3      '%E6%95%8F%E6%84%9F%E8%AF%8D%E6%B1%87%E8%BF%87%E6%BB%A4', ~2
          6      > RETURN                                                   ~3
   45     7*     > RETURN                                                   null

End of function filter

Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GEn5n
function name:  __construct
number of ops:  4
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   RECV                                             !0      
   21     1        ASSIGN_OBJ                                               'obj'
          2        OP_DATA                                                  !0
   22     3      > RETURN                                                   null

End of function __construct

End of class ensitiveFilter.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.08 ms | 1403 KiB | 13 Q