3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Main { private static $name = 333; public function doSomething() { Main::$name = 'dfdsf'; } } $d = new Main; $c = $d->doSomething(); $f = $d::$name = 'cccc'; var_dump($c, $f);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OSV5Q
function name:  (null)
number of ops:  15
compiled vars:  !0 = $d, !1 = $c, !2 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $3      'Main'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   10     3        INIT_METHOD_CALL                                         !0, 'doSomething'
          4        DO_FCALL                                      0  $6      
          5        ASSIGN                                                   !1, $6
   11     6        FETCH_CLASS                                   0  $8      !0
          7        ASSIGN_STATIC_PROP                               ~9      'name', $8
          8        OP_DATA                                                  'cccc'
          9        ASSIGN                                                   !2, ~9
   12    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !1
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Class Main:
Function dosomething:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OSV5Q
function name:  doSomething
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN_STATIC_PROP                                       'name', 'Main'
          1        OP_DATA                                                  'dfdsf'
    7     2      > RETURN                                                   null

End of function dosomething

End of class Main.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.09 ms | 1399 KiB | 15 Q