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'=>new stdClass(), '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/YAJ61
function name:  (null)
number of ops:  20
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'
   11     5        NEW                                              $7      'stdClass'
          6        DO_FCALL                                      0          
          7        INIT_ARRAY                                       ~9      $7, 'attributes'
   12     8        ADD_ARRAY_ELEMENT                                ~9      '0', 'shippable'
   13     9        ADD_ARRAY_ELEMENT                                ~9      'uc_product', 'module'
         10        ADD_ARRAY_ELEMENT                                ~6      ~9, 'data'
         11        INIT_ARRAY                                       ~10     ~6
         12        ADD_ARRAY_ELEMENT                                ~5      ~10, 'products'
         13        INIT_ARRAY                                       ~11     ~5, 'args'
    4    14        ASSIGN                                                   !2, ~11
   19    15        INIT_FCALL                                               'json_encode'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                         $13     
         18        ECHO                                                     $13
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.07 ms | 1399 KiB | 15 Q