3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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
Jump found. Position 1 = -2
filename:       /in/70Adp
function name:  (null)
number of ops:  16
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        CAST                                          6  ~8      !4
         6        INIT_ARRAY                                       ~9      !2, ~8
         7        SEND_VAL                                                 ~9
         8        DO_ICALL                                         $10     
         9        ASSIGN                                                   !3, $10
   9    10        ECHO                                                     '%3Cpre%3E'
  10    11        INIT_FCALL                                               'print_r'
        12        SEND_VAR                                                 !3
        13        DO_ICALL                                                 
  11    14        ECHO                                                     '%3C%2Fpre%3E'
        15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.2.0