3v4l.org

run code in 300+ PHP versions simultaneously
<?php class myA { public function testA() { var_dump(is_callable(array($this, 'testB'))); } } class myB extends myA { 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/spI6b
function name:  (null)
number of ops:  11
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $2      'myA'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   18     3        NEW                                              $5      'myB'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   20     6        INIT_METHOD_CALL                                         !0, 'testA'
          7        DO_FCALL                                      0          
   21     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/spI6b
function name:  testA
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'is_callable'
          2        FETCH_THIS                                       ~0      
          3        INIT_ARRAY                                       ~1      ~0
          4        ADD_ARRAY_ELEMENT                                ~1      'testB'
          5        SEND_VAL                                                 ~1
          6        DO_ICALL                                         $2      
          7        SEND_VAR                                                 $2
          8        DO_ICALL                                                 
    7     9      > RETURN                                                   null

End of function testa

End of class myA.

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

End of function testb

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

End of function testa

End of class myB.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.05 ms | 1400 KiB | 17 Q