3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test{ private $stash = array(); function push() { $this->stash[] = 1; } function pop() { return array_shift($this->stash); } function keys() { return array_keys($this->stash); } } $a = new Test(); for ($i = 0; $i < 5; $i++) { $a->push(); $a->pop(); var_dump($a->keys()); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 5
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 5
Branch analysis from position: 17
Branch analysis from position: 5
filename:       /in/k9snm
function name:  (null)
number of ops:  18
compiled vars:  !0 = $a, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   NEW                                              $2      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   24     3        ASSIGN                                                   !1, 0
          4      > JMP                                                      ->15
   25     5    >   INIT_METHOD_CALL                                         !0, 'push'
          6        DO_FCALL                                      0          
   26     7        INIT_METHOD_CALL                                         !0, 'pop'
          8        DO_FCALL                                      0          
   27     9        INIT_FCALL                                               'var_dump'
         10        INIT_METHOD_CALL                                         !0, 'keys'
         11        DO_FCALL                                      0  $8      
         12        SEND_VAR                                                 $8
         13        DO_ICALL                                                 
   24    14        PRE_INC                                                  !1
         15    >   IS_SMALLER                                               !1, 5
         16      > JMPNZ                                                    ~11, ->5
   28    17    > > RETURN                                                   1

Class Test:
Function push:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k9snm
function name:  push
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_OBJ_W                                      $0      'stash'
          1        ASSIGN_DIM                                               $0
          2        OP_DATA                                                  1
    9     3      > RETURN                                                   null

End of function push

Function pop:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k9snm
function name:  pop
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'array_shift'
          1        FETCH_OBJ_W                                      $0      'stash'
          2        SEND_REF                                                 $0
          3        DO_ICALL                                         $1      
          4      > RETURN                                                   $1
   14     5*     > RETURN                                                   null

End of function pop

Function keys:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k9snm
function name:  keys
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'array_keys'
          1        FETCH_OBJ_R                                      ~0      'stash'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                         $1      
          4      > RETURN                                                   $1
   19     5*     > RETURN                                                   null

End of function keys

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.06 ms | 1400 KiB | 19 Q