3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { function __call($strMethod, $arrArgs) { return "PHP " .phpversion(); } } class B extends A { function getVersion() { return parent::getVersion() . " Rocks!"; } } $A = new A(); echo $A->getVersion() . "<br/>"; $B = new B(); echo $B->getVersion() . "<br/>"; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pHKeW
function name:  (null)
number of ops:  15
compiled vars:  !0 = $A, !1 = $B
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $2      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   15     3        INIT_METHOD_CALL                                         !0, 'getVersion'
          4        DO_FCALL                                      0  $5      
          5        CONCAT                                           ~6      $5, '%3Cbr%2F%3E'
          6        ECHO                                                     ~6
   17     7        NEW                                              $7      'B'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $7
   18    10        INIT_METHOD_CALL                                         !1, 'getVersion'
         11        DO_FCALL                                      0  $10     
         12        CONCAT                                           ~11     $10, '%3Cbr%2F%3E'
         13        ECHO                                                     ~11
   19    14      > RETURN                                                   1

Class A:
Function __call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pHKeW
function name:  __call
number of ops:  7
compiled vars:  !0 = $strMethod, !1 = $arrArgs
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        INIT_FCALL                                               'phpversion'
          3        DO_ICALL                                         $2      
          4        CONCAT                                           ~3      'PHP+', $2
          5      > RETURN                                                   ~3
    5     6*     > RETURN                                                   null

End of function __call

End of class A.

Class B:
Function getversion:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pHKeW
function name:  getVersion
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_STATIC_METHOD_CALL                                  'getVersion'
          1        DO_FCALL                                      0  $0      
          2        CONCAT                                           ~1      $0, '+Rocks%21'
          3      > RETURN                                                   ~1
   11     4*     > RETURN                                                   null

End of function getversion

Function __call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pHKeW
function name:  __call
number of ops:  7
compiled vars:  !0 = $strMethod, !1 = $arrArgs
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        INIT_FCALL                                               'phpversion'
          3        DO_ICALL                                         $2      
          4        CONCAT                                           ~3      'PHP+', $2
          5      > RETURN                                                   ~3
    5     6*     > RETURN                                                   null

End of function __call

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.41 ms | 1400 KiB | 15 Q