3v4l.org

run code in 300+ PHP versions simultaneously
<?php class t { public static $foo; static function changeFoo($value){ self::$foo = $value; } } t::changeFoo("One"); print(t::$foo); t::changeFoo("Two"); print(t::$foo); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nrZXh
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_STATIC_METHOD_CALL                                  't', 'changeFoo'
          1        SEND_VAL                                                 'One'
          2        DO_FCALL                                      0          
   12     3        FETCH_STATIC_PROP_R          unknown             ~1      'foo'
          4        ECHO                                                     ~1
   13     5        INIT_STATIC_METHOD_CALL                                  't', 'changeFoo'
          6        SEND_VAL                                                 'Two'
          7        DO_FCALL                                      0          
   14     8        FETCH_STATIC_PROP_R          unknown             ~3      'foo'
          9        ECHO                                                     ~3
   15    10      > RETURN                                                   1

Class t:
Function changefoo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nrZXh
function name:  changeFoo
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        ASSIGN_STATIC_PROP                                       'foo'
          2        OP_DATA                                                  !0
    8     3      > RETURN                                                   null

End of function changefoo

End of class t.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
133.46 ms | 1393 KiB | 13 Q