3v4l.org

run code in 300+ PHP versions simultaneously
<?php $client = \Eway\Rapid::createClient($apiKey, $apiPassword, $apiEndpoint); $transaction = [ 'Customer' => [ 'Reference' => 'A12345', 'Title' => 'Mr.', 'FirstName' => 'John', 'LastName' => 'Smith', 'CompanyName' => 'Demo Shop 123', 'JobDescription' => 'Developer', 'Street1' => 'Level 5', 'Street2' => '369 Queen Street', 'City' => 'Sydney', 'State' => 'NSW', 'PostalCode' => '2000', 'Country' => 'au', 'Phone' => '09 889 0986', 'Mobile' => '09 889 6542', 'Email' => 'demo@example.org', "Url" => "http://www.ewaypayments.com", 'CardDetails' => [ 'Name' => 'John Smith', 'Number' => '4444333322221111', 'ExpiryMonth' => '12', 'ExpiryYear' => '25', 'CVN' => '123', ] ], 'ShippingAddress' => [ 'ShippingMethod' => \Eway\Rapid\Enum\ShippingMethod::NEXT_DAY, 'FirstName' => 'John', 'LastName' => 'Smith', 'Street1' => 'Level 5', 'Street2' => '369 Queen Street', 'City' => 'Sydney', 'State' => 'NSW', 'Country' => 'au', 'PostalCode' => '2000', 'Phone' => '09 889 0986', ], 'Items' => [ [ 'SKU' => '12345678901234567890', 'Description' => 'Item Description 1', 'Quantity' => 1, 'UnitCost' => 400, 'Tax' => 100, // Total is calculated automatically ], [ 'SKU' => '123456789012', 'Description' => 'Item Description 2', 'Quantity' => 1, 'UnitCost' => 400, 'Tax' => 100, ], ], 'Options' => [ [ 'Value' => 'Option1', ], [ 'Value' => 'Option2', ], ], 'Payment' => [ 'TotalAmount' => 1000, 'InvoiceNumber' => 'Inv 21540', 'InvoiceDescription' => 'Individual Invoice Description', 'InvoiceReference' => '513456', 'CurrencyCode' => 'AUD', ], 'DeviceID' => 'D1234', 'CustomerIP' => '127.0.0.1', 'PartnerID' => 'ID', 'TransactionType' => \Eway\Rapid\Enum\TransactionType::PURCHASE, 'Capture' => true, ]; $response = $client->createTransaction(\Eway\Rapid\Enum\ApiMethod::DIRECT, $transaction);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CDet7
function name:  (null)
number of ops:  36
compiled vars:  !0 = $client, !1 = $apiKey, !2 = $apiPassword, !3 = $apiEndpoint, !4 = $transaction, !5 = $response
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_STATIC_METHOD_CALL                                  'Eway%5CRapid', 'createClient'
          1        SEND_VAR_EX                                              !1
          2        SEND_VAR_EX                                              !2
          3        SEND_VAR_EX                                              !3
          4        DO_FCALL                                      0  $6      
          5        ASSIGN                                                   !0, $6
    7     6        INIT_ARRAY                                       ~8      <array>, 'Customer'
   32     7        FETCH_CLASS_CONSTANT                             ~9      'Eway%5CRapid%5CEnum%5CShippingMethod', 'NEXT_DAY'
          8        INIT_ARRAY                                       ~10     ~9, 'ShippingMethod'
   33     9        ADD_ARRAY_ELEMENT                                ~10     'John', 'FirstName'
   34    10        ADD_ARRAY_ELEMENT                                ~10     'Smith', 'LastName'
   35    11        ADD_ARRAY_ELEMENT                                ~10     'Level+5', 'Street1'
   36    12        ADD_ARRAY_ELEMENT                                ~10     '369+Queen+Street', 'Street2'
   37    13        ADD_ARRAY_ELEMENT                                ~10     'Sydney', 'City'
   38    14        ADD_ARRAY_ELEMENT                                ~10     'NSW', 'State'
   39    15        ADD_ARRAY_ELEMENT                                ~10     'au', 'Country'
   40    16        ADD_ARRAY_ELEMENT                                ~10     '2000', 'PostalCode'
   41    17        ADD_ARRAY_ELEMENT                                ~10     '09+889+0986', 'Phone'
         18        ADD_ARRAY_ELEMENT                                ~8      ~10, 'ShippingAddress'
    7    19        ADD_ARRAY_ELEMENT                                ~8      <array>, 'Items'
         20        ADD_ARRAY_ELEMENT                                ~8      <array>, 'Options'
         21        ADD_ARRAY_ELEMENT                                ~8      <array>, 'Payment'
   75    22        ADD_ARRAY_ELEMENT                                ~8      'D1234', 'DeviceID'
   76    23        ADD_ARRAY_ELEMENT                                ~8      '127.0.0.1', 'CustomerIP'
   77    24        ADD_ARRAY_ELEMENT                                ~8      'ID', 'PartnerID'
   78    25        FETCH_CLASS_CONSTANT                             ~11     'Eway%5CRapid%5CEnum%5CTransactionType', 'PURCHASE'
         26        ADD_ARRAY_ELEMENT                                ~8      ~11, 'TransactionType'
    7    27        ADD_ARRAY_ELEMENT                                ~8      <true>, 'Capture'
    5    28        ASSIGN                                                   !4, ~8
   82    29        INIT_METHOD_CALL                                         !0, 'createTransaction'
         30        FETCH_CLASS_CONSTANT                             ~13     'Eway%5CRapid%5CEnum%5CApiMethod', 'DIRECT'
         31        SEND_VAL_EX                                              ~13
         32        SEND_VAR_EX                                              !4
         33        DO_FCALL                                      0  $14     
         34        ASSIGN                                                   !5, $14
         35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.78 ms | 1399 KiB | 13 Q