3v4l.org

run code in 300+ PHP versions simultaneously
<?php $nid = 19977; $uid = 13; $purchaseParams = array( 'args'=>array( 'uid'=>$uid, 'payment_method'=>'free_order', 'products' => array( array( 'pid'=>$nid, 'data'=>array('attributes'=> array("4" => 6), 'shippable'=>'0', 'module'=>'uc_product' ) ) ) )); print json_encode($purchaseParams);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WRcmG
function name:  (null)
number of ops:  15
compiled vars:  !0 = $nid, !1 = $uid, !2 = $purchaseParams
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 19977
    3     1        ASSIGN                                                   !1, 13
    6     2        INIT_ARRAY                                       ~5      !1, 'uid'
    7     3        ADD_ARRAY_ELEMENT                                ~5      'free_order', 'payment_method'
   10     4        INIT_ARRAY                                       ~6      !0, 'pid'
    6     5        ADD_ARRAY_ELEMENT                                ~6      <array>, 'data'
          6        INIT_ARRAY                                       ~7      ~6
          7        ADD_ARRAY_ELEMENT                                ~5      ~7, 'products'
          8        INIT_ARRAY                                       ~8      ~5, 'args'
    4     9        ASSIGN                                                   !2, ~8
   19    10        INIT_FCALL                                               'json_encode'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                         $10     
         13        ECHO                                                     $10
         14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.56 ms | 1394 KiB | 15 Q