3v4l.org

run code in 300+ PHP versions simultaneously
<?php $params = array('name' => 'Test', 'age' => 20); $field = 'id'; $value = 2; $where = array_merge($params, array("'".${$id}."'" => $value)); echo '<pre>'; print_r($where); echo '</pre>';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HZWvJ
function name:  (null)
number of ops:  18
compiled vars:  !0 = $params, !1 = $field, !2 = $value, !3 = $where, !4 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, 'id'
    5     2        ASSIGN                                                   !2, 2
    7     3        INIT_FCALL                                               'array_merge'
          4        SEND_VAR                                                 !0
          5        FETCH_R                      local               ~8      !4
          6        CONCAT                                           ~9      '%27', ~8
          7        CONCAT                                           ~10     ~9, '%27'
          8        INIT_ARRAY                                       ~11     !2, ~10
          9        SEND_VAL                                                 ~11
         10        DO_ICALL                                         $12     
         11        ASSIGN                                                   !3, $12
    9    12        ECHO                                                     '%3Cpre%3E'
   10    13        INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !3
         15        DO_ICALL                                                 
   11    16        ECHO                                                     '%3C%2Fpre%3E'
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.82 ms | 1386 KiB | 17 Q