3v4l.org

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

Function value:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CKWjj
function name:  value
number of ops:  10
compiled vars:  !0 = $s, !1 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        ASSIGN                                                   !0, <array>
    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
    9     8      > RETURN                                                   !0
   10     9*     > RETURN                                                   null

End of function value

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.85 ms | 1397 KiB | 18 Q