3v4l.org

run code in 300+ PHP versions simultaneously
<?php class cParent { public function parentCall($str) { $this->$str(); } public function foo() { echo 'Превед! Йа от родителя' . PHP_EOL; } } class cChild extends cParent { public function childCall($str) { $this->$str(); } /*public function foo() { echo 'Здравствуйте, я ребёнок' . PHP_EOL; }*/ } $obj = new cChild(); $obj->foo(); $obj->childCall('foo'); $obj->parentCall('foo');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/imoFq
function name:  (null)
number of ops:  12
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   NEW                                              $1      'cChild'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   28     3        INIT_METHOD_CALL                                         !0, 'foo'
          4        DO_FCALL                                      0          
   29     5        INIT_METHOD_CALL                                         !0, 'childCall'
          6        SEND_VAL_EX                                              'foo'
          7        DO_FCALL                                      0          
   30     8        INIT_METHOD_CALL                                         !0, 'parentCall'
          9        SEND_VAL_EX                                              'foo'
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

Class cParent:
Function parentcall:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/imoFq
function name:  parentCall
number of ops:  4
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        INIT_METHOD_CALL                                         !0
          2        DO_FCALL                                      0          
    8     3      > RETURN                                                   null

End of function parentcall

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/imoFq
function name:  foo
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ECHO                                                     '%D0%9F%D1%80%D0%B5%D0%B2%D0%B5%D0%B4%21+%D0%99%D0%B0+%D0%BE%D1%82+%D1%80%D0%BE%D0%B4%D0%B8%D1%82%D0%B5%D0%BB%D1%8F%0A'
   12     1      > RETURN                                                   null

End of function foo

End of class cParent.

Class cChild:
Function childcall:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/imoFq
function name:  childCall
number of ops:  4
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
   19     1        INIT_METHOD_CALL                                         !0
          2        DO_FCALL                                      0          
   20     3      > RETURN                                                   null

End of function childcall

Function parentcall:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/imoFq
function name:  parentCall
number of ops:  4
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        INIT_METHOD_CALL                                         !0
          2        DO_FCALL                                      0          
    8     3      > RETURN                                                   null

End of function parentcall

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/imoFq
function name:  foo
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ECHO                                                     '%D0%9F%D1%80%D0%B5%D0%B2%D0%B5%D0%B4%21+%D0%99%D0%B0+%D0%BE%D1%82+%D1%80%D0%BE%D0%B4%D0%B8%D1%82%D0%B5%D0%BB%D1%8F%0A'
   12     1      > RETURN                                                   null

End of function foo

End of class cChild.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.56 ms | 1390 KiB | 13 Q