3v4l.org

run code in 300+ PHP versions simultaneously
<?php class parentx { //public function bagr() { } } class childx extends parentx { public function bagr() { if (!method_exists(get_parent_class($this), __FUNCTION__)) { throw new \LogicException; } // muj kód } } $x = new childx(); $x->bagr();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/b94iv
function name:  (null)
number of ops:  6
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   NEW                                              $1      'childx'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   21     3        INIT_METHOD_CALL                                         !0, 'bagr'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class parentx: [no user functions]
Class childx:
Function bagr:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/b94iv
function name:  bagr
number of ops:  14
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'method_exists'
          1        INIT_FCALL                                               'get_parent_class'
          2        FETCH_THIS                                       ~0      
          3        SEND_VAL                                                 ~0
          4        DO_ICALL                                         $1      
          5        SEND_VAR                                                 $1
          6        SEND_VAL                                                 'bagr'
          7        DO_ICALL                                         $2      
          8        BOOL_NOT                                         ~3      $2
          9      > JMPZ                                                     ~3, ->13
   14    10    >   NEW                                              $4      'LogicException'
         11        DO_FCALL                                      0          
         12      > THROW                                         0          $4
   17    13    > > RETURN                                                   null

End of function bagr

End of class childx.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.24 ms | 1395 KiB | 17 Q