3v4l.org

run code in 300+ PHP versions simultaneously
<?php Class X { public function get($name) { return "foo"; } } Class Y extends X { public function get($name) { return parent::get($name); } } $foo = new X(); for ($i=0; $i < 100000; $i++) { $foo->get("bar"); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 5
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 5
Branch analysis from position: 11
Branch analysis from position: 5
filename:       /in/C6ID3
function name:  (null)
number of ops:  12
compiled vars:  !0 = $foo, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $2      'X'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   18     3        ASSIGN                                                   !1, 0
          4      > JMP                                                      ->9
   19     5    >   INIT_METHOD_CALL                                         !0, 'get'
          6        SEND_VAL_EX                                              'bar'
          7        DO_FCALL                                      0          
   18     8        PRE_INC                                                  !1
          9    >   IS_SMALLER                                               !1, 100000
         10      > JMPNZ                                                    ~8, ->5
   20    11    > > RETURN                                                   1

Class X:
Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/C6ID3
function name:  get
number of ops:  3
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1      > RETURN                                                   'foo'
    7     2*     > RETURN                                                   null

End of function get

End of class X.

Class Y:
Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/C6ID3
function name:  get
number of ops:  6
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        INIT_STATIC_METHOD_CALL                                  'get'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $1      
          4      > RETURN                                                   $1
   13     5*     > RETURN                                                   null

End of function get

End of class Y.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.74 ms | 1395 KiB | 13 Q