3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private array $d = [ 'a' => 1, 'b' => 2, ]; public function all(): array { return $this->d; } } class B extends A { public function push($k, $v): void { $this->d[$k] = $v; } } $b = (new B()); $b->push('c', 3); var_dump($b->all());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2mVuc
function name:  (null)
number of ops:  13
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   NEW                                              $1      'B'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   21     3        INIT_METHOD_CALL                                         !0, 'push'
          4        SEND_VAL_EX                                              'c'
          5        SEND_VAL_EX                                              3
          6        DO_FCALL                                      0          
   23     7        INIT_FCALL                                               'var_dump'
          8        INIT_METHOD_CALL                                         !0, 'all'
          9        DO_FCALL                                      0  $5      
         10        SEND_VAR                                                 $5
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

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

End of function all

End of class A.

Class B:
Function push:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2mVuc
function name:  push
number of ops:  6
compiled vars:  !0 = $k, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   16     2        FETCH_OBJ_W                                      $2      'd'
          3        ASSIGN_DIM                                               $2, !0
          4        OP_DATA                                                  !1
   17     5      > RETURN                                                   null

End of function push

Function all:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2mVuc
function name:  all
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   FETCH_OBJ_R                                      ~0      'd'
          1        VERIFY_RETURN_TYPE                                       ~0
          2      > RETURN                                                   ~0
   11     3*       VERIFY_RETURN_TYPE                                       
          4*     > RETURN                                                   null

End of function all

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.22 ms | 1433 KiB | 14 Q