3v4l.org

run code in 300+ PHP versions simultaneously
<?php class myA { public function testA() { var_dump($this, is_callable(array($this, 'testB'))); } } class myB extends myA { public function testA () { return parent::testA(); } public function testB () { return; } } $a = new myA(); $b = new myB(); $a->testA(); $b->testA();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v2N2A
function name:  (null)
number of ops:  11
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   NEW                                              $2      'myA'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   23     3        NEW                                              $5      'myB'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   25     6        INIT_METHOD_CALL                                         !0, 'testA'
          7        DO_FCALL                                      0          
   26     8        INIT_METHOD_CALL                                         !1, 'testA'
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

Class myA:
Function testa:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v2N2A
function name:  testA
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_THIS                                       ~0      
          2        SEND_VAL                                                 ~0
          3        INIT_FCALL                                               'is_callable'
          4        FETCH_THIS                                       ~1      
          5        INIT_ARRAY                                       ~2      ~1
          6        ADD_ARRAY_ELEMENT                                ~2      'testB'
          7        SEND_VAL                                                 ~2
          8        DO_ICALL                                         $3      
          9        SEND_VAR                                                 $3
         10        DO_ICALL                                                 
    7    11      > RETURN                                                   null

End of function testa

End of class myA.

Class myB:
Function testa:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v2N2A
function name:  testA
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_STATIC_METHOD_CALL                                  'testA'
          1        DO_FCALL                                      0  $0      
          2      > RETURN                                                   $0
   15     3*     > RETURN                                                   null

End of function testa

Function testb:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v2N2A
function name:  testB
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E > > RETURN                                                   null
   19     1*     > RETURN                                                   null

End of function testb

End of class myB.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.56 ms | 1396 KiB | 17 Q