3v4l.org

run code in 300+ PHP versions simultaneously
<?php (function () { if (true) { static $foo = 'bar'; } else { static $foo = 'lol'; } var_dump($foo); static $bar; if (true) { $bar = 'bar'; } else { $bar = 'lol'; } var_dump($bar); })();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OjQZn
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FOjQZn%3A3%240'
   22     1        INIT_DYNAMIC_CALL                                        ~0
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FOjQZn%3A3%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 1, Position 2 = 3
Branch analysis from position: 1
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
Branch analysis from position: 11
filename:       /in/OjQZn
function name:  {closure}
number of ops:  16
compiled vars:  !0 = $foo, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E > > JMPZ                                                     <true>, ->3
    5     1    >   BIND_STATIC                                              !0
          2      > JMP                                                      ->4
    8     3    >   BIND_STATIC                                              !0
   11     4    >   INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
   13     7        BIND_STATIC                                              !1
   14     8      > JMPZ                                                     <true>, ->11
   15     9    >   ASSIGN                                                   !1, 'bar'
         10      > JMP                                                      ->12
   18    11    >   ASSIGN                                                   !1, 'lol'
   21    12    >   INIT_FCALL                                               'var_dump'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                                 
   22    15      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FOjQZn%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.05 ms | 1396 KiB | 15 Q