3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function whoami() { return 'A'; } public function __call($method, array $args) { return 'A::__call::' . $method; } } class BB extends A { public function whoami() { return 'BB'; } public function getX() { return 'BB::getX (FYI: parent is ' . parent::whoami(). ') -> ' . parent::getX() ; } } class CCC extends BB { public function whoami() { return 'CCC'; } public function __call($method, array $args) { return 'CCC::__call::' . $method . ' -> ' . parent::__call($method, $args); } } $c = new CCC(); echo $c->getX() . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OrFQG
function name:  (null)
number of ops:  8
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $1      'CCC'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   24     3        INIT_METHOD_CALL                                         !0, 'getX'
          4        DO_FCALL                                      0  $4      
          5        CONCAT                                           ~5      $4, '%0A'
          6        ECHO                                                     ~5
          7      > RETURN                                                   1

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

End of function whoami

Function __call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OrFQG
function name:  __call
number of ops:  5
compiled vars:  !0 = $method, !1 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        CONCAT                                           ~2      'A%3A%3A__call%3A%3A', !0
          3      > RETURN                                                   ~2
    6     4*     > RETURN                                                   null

End of function __call

End of class A.

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

End of function whoami

Function getx:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OrFQG
function name:  getX
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_STATIC_METHOD_CALL                                  'whoami'
          1        DO_FCALL                                      0  $0      
          2        CONCAT                                           ~1      'BB%3A%3AgetX+%28FYI%3A+parent+is+', $0
          3        CONCAT                                           ~2      ~1, '%29+-%3E+'
   13     4        INIT_STATIC_METHOD_CALL                                  'getX'
          5        DO_FCALL                                      0  $3      
          6        CONCAT                                           ~4      ~2, $3
          7      > RETURN                                                   ~4
   14     8*     > RETURN                                                   null

End of function getx

Function __call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OrFQG
function name:  __call
number of ops:  5
compiled vars:  !0 = $method, !1 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        CONCAT                                           ~2      'A%3A%3A__call%3A%3A', !0
          3      > RETURN                                                   ~2
    6     4*     > RETURN                                                   null

End of function __call

End of class BB.

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

End of function whoami

Function __call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OrFQG
function name:  __call
number of ops:  11
compiled vars:  !0 = $method, !1 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   19     2        CONCAT                                           ~2      'CCC%3A%3A__call%3A%3A', !0
          3        CONCAT                                           ~3      ~2, '+-%3E+'
   20     4        INIT_STATIC_METHOD_CALL                                  '__call'
          5        SEND_VAR_EX                                              !0
          6        SEND_VAR_EX                                              !1
          7        DO_FCALL                                      0  $4      
          8        CONCAT                                           ~5      ~3, $4
          9      > RETURN                                                   ~5
   21    10*     > RETURN                                                   null

End of function __call

Function getx:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OrFQG
function name:  getX
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_STATIC_METHOD_CALL                                  'whoami'
          1        DO_FCALL                                      0  $0      
          2        CONCAT                                           ~1      'BB%3A%3AgetX+%28FYI%3A+parent+is+', $0
          3        CONCAT                                           ~2      ~1, '%29+-%3E+'
   13     4        INIT_STATIC_METHOD_CALL                                  'getX'
          5        DO_FCALL                                      0  $3      
          6        CONCAT                                           ~4      ~2, $3
          7      > RETURN                                                   ~4
   14     8*     > RETURN                                                   null

End of function getx

End of class CCC.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.54 ms | 1399 KiB | 13 Q