3v4l.org

run code in 300+ PHP versions simultaneously
<?php $partner_array = array( 'PartnerId' => '6729', ); $partner = (object) $partner_array; $buyer_array = array( 'Email' => 'escrow.buyer@hotmail.com', 'Initiator' => 'false', 'CompanyChk' => 'false', 'AutoAgree' => 'false', 'AgreementChecked' => 'false', ); $buyer = (object) $buyer_array; $seller_array = array( 'Email' => 'escrow.seller@hotmail.com', 'Initiator' => 'false', 'CompanyChk' => 'false', 'AutoAgree' => 'false', 'AgreementChecked' => 'false', ); $seller = (object) $seller_array; $broker_array = array( 'Email' => 'escrow.broker@hotmail.com', 'Initiator' => 'true', 'CompanyChk' => 'true', 'AutoAgree' => 'true', 'AgreementChecked' => 'true', ); $broker = (object) $broker_array; // This array contains objects, which container the inner array $line_items_container_array = array(); // Holds data about the line item $line_items_inner_array = array( 'ItemName' => 'Line item 1', 'Description' => 'REST Service test line item', 'Quantity' => '1', 'Price' => '2500', 'Accept' => 'true', 'SellComm' => '100', 'BuyComm' => '50', ); $line_items = (object) $line_items_inner_array; $line_items_container_array[] = $line_items; $json_array = array( 'Title' => 'JSON GM Broker Transaction (REST Service)', 'Description' => 'JSON GM Broker Transaction (REST Service)', 'TransactionType' => '1', 'EscrowPayment' => '0', 'ShipmentFee' => '25', 'ShipmentPayment' => '0', 'InspectionLength' => '6', 'Currency' => 'USD', 'Fulfillment' => '1', 'Disclosure' => '1', 'BrokerCommissionPayee' => 'Buyer', 'BrkCommissionBuyerPortion' => '18.1', 'BrkCommissionSellerPortion' => '19.1', 'CommissionType' => '1', 'InitiationDate' => '2014-04-15', 'TransactionLocked' => 'true', 'PartnerTransID' => '12345', 'TermsLocked' => 'true', 'AllowReject' => 'true', 'Partner' => $partner, 'Buyer' => $buyer, 'Seller' => $seller, 'Broker' => $broker, 'LineItems' => $line_items_container_array, ); $json = json_encode($json_array); print_r($json);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YqRK8
function name:  (null)
number of ops:  51
compiled vars:  !0 = $partner_array, !1 = $partner, !2 = $buyer_array, !3 = $buyer, !4 = $seller_array, !5 = $seller, !6 = $broker_array, !7 = $broker, !8 = $line_items_container_array, !9 = $line_items_inner_array, !10 = $line_items, !11 = $json_array, !12 = $json
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    6     1        CAST                                          8  ~14     !0
          2        ASSIGN                                                   !1, ~14
    8     3        ASSIGN                                                   !2, <array>
   15     4        CAST                                          8  ~17     !2
          5        ASSIGN                                                   !3, ~17
   17     6        ASSIGN                                                   !4, <array>
   24     7        CAST                                          8  ~20     !4
          8        ASSIGN                                                   !5, ~20
   26     9        ASSIGN                                                   !6, <array>
   33    10        CAST                                          8  ~23     !6
         11        ASSIGN                                                   !7, ~23
   36    12        ASSIGN                                                   !8, <array>
   38    13        ASSIGN                                                   !9, <array>
   47    14        CAST                                          8  ~27     !9
         15        ASSIGN                                                   !10, ~27
   48    16        ASSIGN_DIM                                               !8
         17        OP_DATA                                                  !10
   51    18        INIT_ARRAY                                       ~30     'JSON+GM+Broker+Transaction+%28REST+Service%29', 'Title'
   52    19        ADD_ARRAY_ELEMENT                                ~30     'JSON+GM+Broker+Transaction+%28REST+Service%29', 'Description'
   53    20        ADD_ARRAY_ELEMENT                                ~30     '1', 'TransactionType'
   54    21        ADD_ARRAY_ELEMENT                                ~30     '0', 'EscrowPayment'
   55    22        ADD_ARRAY_ELEMENT                                ~30     '25', 'ShipmentFee'
   56    23        ADD_ARRAY_ELEMENT                                ~30     '0', 'ShipmentPayment'
   57    24        ADD_ARRAY_ELEMENT                                ~30     '6', 'InspectionLength'
   58    25        ADD_ARRAY_ELEMENT                                ~30     'USD', 'Currency'
   59    26        ADD_ARRAY_ELEMENT                                ~30     '1', 'Fulfillment'
   60    27        ADD_ARRAY_ELEMENT                                ~30     '1', 'Disclosure'
   61    28        ADD_ARRAY_ELEMENT                                ~30     'Buyer', 'BrokerCommissionPayee'
   62    29        ADD_ARRAY_ELEMENT                                ~30     '18.1', 'BrkCommissionBuyerPortion'
   63    30        ADD_ARRAY_ELEMENT                                ~30     '19.1', 'BrkCommissionSellerPortion'
   64    31        ADD_ARRAY_ELEMENT                                ~30     '1', 'CommissionType'
   65    32        ADD_ARRAY_ELEMENT                                ~30     '2014-04-15', 'InitiationDate'
   66    33        ADD_ARRAY_ELEMENT                                ~30     'true', 'TransactionLocked'
   67    34        ADD_ARRAY_ELEMENT                                ~30     '12345', 'PartnerTransID'
   68    35        ADD_ARRAY_ELEMENT                                ~30     'true', 'TermsLocked'
   69    36        ADD_ARRAY_ELEMENT                                ~30     'true', 'AllowReject'
   70    37        ADD_ARRAY_ELEMENT                                ~30     !1, 'Partner'
   71    38        ADD_ARRAY_ELEMENT                                ~30     !3, 'Buyer'
   72    39        ADD_ARRAY_ELEMENT                                ~30     !5, 'Seller'
   73    40        ADD_ARRAY_ELEMENT                                ~30     !7, 'Broker'
   74    41        ADD_ARRAY_ELEMENT                                ~30     !8, 'LineItems'
   50    42        ASSIGN                                                   !11, ~30
   77    43        INIT_FCALL                                               'json_encode'
         44        SEND_VAR                                                 !11
         45        DO_ICALL                                         $32     
         46        ASSIGN                                                   !12, $32
   78    47        INIT_FCALL                                               'print_r'
         48        SEND_VAR                                                 !12
         49        DO_ICALL                                                 
         50      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.59 ms | 1392 KiB | 17 Q