3v4l.org

run code in 300+ PHP versions simultaneously
<?php class BaseController{ public function __call($a,$b){ if (method_exists($this, "Action")) { } else if (method_exists($this, "DefaultAction")) { if ($this->DefaultAction()){ } exit; } } } class TestPage extends BaseController{ private function DefaultAction(){ return false; } } $testpage = new TestPage(); $testpage->Show();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cjcGr
function name:  (null)
number of ops:  6
compiled vars:  !0 = $testpage
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $1      'TestPage'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   19     3        INIT_METHOD_CALL                                         !0, 'Show'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class BaseController:
Function __call:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 19
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 18
Branch analysis from position: 18
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 18
Branch analysis from position: 19
filename:       /in/cjcGr
function name:  __call
number of ops:  20
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        INIT_FCALL                                               'method_exists'
          3        FETCH_THIS                                       ~2      
          4        SEND_VAL                                                 ~2
          5        SEND_VAL                                                 'Action'
          6        DO_ICALL                                         $3      
          7      > JMPZ                                                     $3, ->9
          8    > > JMP                                                      ->19
    5     9    >   INIT_FCALL                                               'method_exists'
         10        FETCH_THIS                                       ~4      
         11        SEND_VAL                                                 ~4
         12        SEND_VAL                                                 'DefaultAction'
         13        DO_ICALL                                         $5      
         14      > JMPZ                                                     $5, ->19
    6    15    >   INIT_METHOD_CALL                                         'DefaultAction'
         16        DO_FCALL                                      0  $6      
         17      > JMPZ                                                     $6, ->18
    9    18    > > EXIT                                                     
   11    19    > > RETURN                                                   null

End of function __call

End of class BaseController.

Class TestPage:
Function defaultaction:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cjcGr
function name:  DefaultAction
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E > > RETURN                                                   <false>
   16     1*     > RETURN                                                   null

End of function defaultaction

Function __call:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 19
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 18
Branch analysis from position: 18
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 18
Branch analysis from position: 19
filename:       /in/cjcGr
function name:  __call
number of ops:  20
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        INIT_FCALL                                               'method_exists'
          3        FETCH_THIS                                       ~2      
          4        SEND_VAL                                                 ~2
          5        SEND_VAL                                                 'Action'
          6        DO_ICALL                                         $3      
          7      > JMPZ                                                     $3, ->9
          8    > > JMP                                                      ->19
    5     9    >   INIT_FCALL                                               'method_exists'
         10        FETCH_THIS                                       ~4      
         11        SEND_VAL                                                 ~4
         12        SEND_VAL                                                 'DefaultAction'
         13        DO_ICALL                                         $5      
         14      > JMPZ                                                     $5, ->19
    6    15    >   INIT_METHOD_CALL                                         'DefaultAction'
         16        DO_FCALL                                      0  $6      
         17      > JMPZ                                                     $6, ->18
    9    18    > > EXIT                                                     
   11    19    > > RETURN                                                   null

End of function __call

End of class TestPage.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.35 ms | 1400 KiB | 15 Q