3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { protected $foo = 1; public function update(){ $this->foo+=10; } } $className = new test(); var_dump( $className ); $className->foo=100; var_dump( $className );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PJoolL
function name:  (null)
number of ops:  12
compiled vars:  !0 = $className
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $1      'test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   12     3        INIT_FCALL                                               'var_dump'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
   13     6        ASSIGN_OBJ                                               !0, 'foo'
          7        OP_DATA                                                  100
   14     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Class test:
Function update:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PJoolL
function name:  update
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN_OBJ_OP                                 1          'foo'
          1        OP_DATA                                                  10
    8     2      > RETURN                                                   null

End of function update

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.74 ms | 1394 KiB | 15 Q