3v4l.org

run code in 300+ PHP versions simultaneously
<?php class X { public $_cache_tags = ['default', 'stuff']; public function shit() { $this->_cache_tags[] = 'this works'; array_push($this->_cache_tags, 'this too'); } } $x = new X(); $x->shit(); var_dump($x->_cache_tags);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/J7VoH
function name:  (null)
number of ops:  10
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'X'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   14     3        INIT_METHOD_CALL                                         !0, 'shit'
          4        DO_FCALL                                      0          
   15     5        INIT_FCALL                                               'var_dump'
          6        FETCH_OBJ_R                                      ~5      !0, '_cache_tags'
          7        SEND_VAL                                                 ~5
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Class X:
Function shit:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/J7VoH
function name:  shit
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_OBJ_W                                      $0      '_cache_tags'
          1        ASSIGN_DIM                                               $0
          2        OP_DATA                                                  'this+works'
    8     3        INIT_FCALL                                               'array_push'
          4        FETCH_OBJ_W                                      $2      '_cache_tags'
          5        SEND_REF                                                 $2
          6        SEND_VAL                                                 'this+too'
          7        DO_ICALL                                                 
    9     8      > RETURN                                                   null

End of function shit

End of class X.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.79 ms | 1395 KiB | 17 Q