3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Everything { public static function is($newValue) { foreach ($_GLOBALS as $key => &$value) { $value = $newValue; } } } $foo = 'foo'; $bar = 'bar'; Everything::is('awesome'); var_dump($foo, $bar);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2mdFq
function name:  (null)
number of ops:  10
compiled vars:  !0 = $foo, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN                                                   !0, 'foo'
   10     1        ASSIGN                                                   !1, 'bar'
   11     2        INIT_STATIC_METHOD_CALL                                  'Everything', 'is'
          3        SEND_VAL                                                 'awesome'
          4        DO_FCALL                                      0          
   12     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
          9      > RETURN                                                   1

Class Everything:
Function is:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 125) Position 1 = 2, Position 2 = 6
Branch analysis from position: 2
2 jumps found. (Code = 126) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/2mdFq
function name:  is
number of ops:  8
compiled vars:  !0 = $newValue, !1 = $_GLOBALS, !2 = $value, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1      > FE_RESET_RW                                      $4      !1, ->6
          2    > > FE_FETCH_RW                                      ~5      $4, !2, ->6
          3    >   ASSIGN                                                   !3, ~5
    5     4        ASSIGN                                                   !2, !0
    4     5      > JMP                                                      ->2
          6    >   FE_FREE                                                  $4
    7     7      > RETURN                                                   null

End of function is

End of class Everything.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.82 ms | 1395 KiB | 15 Q