3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Abunyasha { public function __construct(private string $reason) {} public function ban (): string { $this->poshatatMakabu(); $this->goToMailRu(); // И ещё много всякого кода, который на 100% одинаков для всех наследников. return "Ban po prichine: " . $this->reason . "!"; } public function poshatatMakabu () : void { var_dump("2ch ypal"); } public function goToMailRu () : void { var_dump("prepare your anus"); } } $aOne = new Abunyasha('reason 1'); var_dump($aOne->ban()); $aTwo = new Abunyasha('reason 2'); var_dump($aTwo->ban()); $aThree = new Abunyasha('reason 3'); var_dump($aThree->ban());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BsCvr
function name:  (null)
number of ops:  28
compiled vars:  !0 = $aOne, !1 = $aTwo, !2 = $aThree
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   21     0  E >   NEW                                                  $3      'Abunyasha'
          1        SEND_VAL_EX                                                  'reason+1'
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !0, $3
   22     4        INIT_FCALL                                                   'var_dump'
          5        INIT_METHOD_CALL                                             !0, 'ban'
          6        DO_FCALL                                          0  $6      
          7        SEND_VAR                                                     $6
          8        DO_ICALL                                                     
   23     9        NEW                                                  $8      'Abunyasha'
         10        SEND_VAL_EX                                                  'reason+2'
         11        DO_FCALL                                          0          
         12        ASSIGN                                                       !1, $8
   24    13        INIT_FCALL                                                   'var_dump'
         14        INIT_METHOD_CALL                                             !1, 'ban'
         15        DO_FCALL                                          0  $11     
         16        SEND_VAR                                                     $11
         17        DO_ICALL                                                     
   25    18        NEW                                                  $13     'Abunyasha'
         19        SEND_VAL_EX                                                  'reason+3'
         20        DO_FCALL                                          0          
         21        ASSIGN                                                       !2, $13
   26    22        INIT_FCALL                                                   'var_dump'
         23        INIT_METHOD_CALL                                             !2, 'ban'
         24        DO_FCALL                                          0  $16     
         25        SEND_VAR                                                     $16
         26        DO_ICALL                                                     
         27      > RETURN                                                       1

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

End of function __construct

Function ban:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BsCvr
function name:  ban
number of ops:  11
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   INIT_METHOD_CALL                                             'poshatatMakabu'
          1        DO_FCALL                                          0          
    7     2        INIT_METHOD_CALL                                             'goToMailRu'
          3        DO_FCALL                                          0          
   10     4        FETCH_OBJ_R                                          ~2      'reason'
          5        CONCAT                                               ~3      'Ban+po+prichine%3A+', ~2
          6        CONCAT                                               ~4      ~3, '%21'
          7        VERIFY_RETURN_TYPE                                           ~4
          8      > RETURN                                                       ~4
   11     9*       VERIFY_RETURN_TYPE                                           
         10*     > RETURN                                                       null

End of function ban

Function poshatatmakabu:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BsCvr
function name:  poshatatMakabu
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                                   'var_dump'
          1        SEND_VAL                                                     '2ch+ypal'
          2        DO_ICALL                                                     
   15     3      > RETURN                                                       null

End of function poshatatmakabu

Function gotomailru:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BsCvr
function name:  goToMailRu
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                                   'var_dump'
          1        SEND_VAL                                                     'prepare+your+anus'
          2        DO_ICALL                                                     
   18     3      > RETURN                                                       null

End of function gotomailru

End of class Abunyasha.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.32 ms | 1465 KiB | 14 Q