3v4l.org

run code in 300+ PHP versions simultaneously
<?php function fnc($var){ static $a = 1; static $b = 2; return $$var; } echo fnc("a").",".fnc("b")."\n"; // 1,2
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2CqSu
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'fnc'
          1        SEND_VAL                                                 'a'
          2        DO_FCALL                                      0  $0      
          3        CONCAT                                           ~1      $0, '%2C'
          4        INIT_FCALL                                               'fnc'
          5        SEND_VAL                                                 'b'
          6        DO_FCALL                                      0  $2      
          7        CONCAT                                           ~3      ~1, $2
          8        CONCAT                                           ~4      ~3, '%0A'
          9        ECHO                                                     ~4
         10      > RETURN                                                   1

Function fnc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2CqSu
function name:  fnc
number of ops:  6
compiled vars:  !0 = $var, !1 = $a, !2 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        BIND_STATIC                                              !1
    5     2        BIND_STATIC                                              !2
    6     3        FETCH_R                      local               ~3      !0
          4      > RETURN                                                   ~3
    7     5*     > RETURN                                                   null

End of function fnc

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.77 ms | 1000 KiB | 15 Q