3v4l.org

run code in 300+ PHP versions simultaneously
<?php function value($s) { $s = 5; $args = func_get_args(); $s = array_shift($args); } $s = 2; value($s); var_dump($s);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qkhnj
function name:  (null)
number of ops:  8
compiled vars:  !0 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN                                                   !0, 2
   10     1        INIT_FCALL                                               'value'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0          
   11     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function value:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qkhnj
function name:  value
number of ops:  9
compiled vars:  !0 = $s, !1 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        ASSIGN                                                   !0, 5
    6     2        FUNC_GET_ARGS                                    ~3      
          3        ASSIGN                                                   !1, ~3
    7     4        INIT_FCALL                                               'array_shift'
          5        SEND_REF                                                 !1
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !0, $5
    8     8      > RETURN                                                   null

End of function value

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.13 ms | 1397 KiB | 18 Q