3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * OpenPayU * * @copyright Copyright (c) 2014 PayU * @license http://opensource.org/licenses/LGPL-3.0 Open Software License (LGPL 3.0) * * http://www.payu.com * http://developers.payu.com * http://twitter.com/openpayu * */ session_start(); var_dump($_SESSION['current_token']); require_once realpath(dirname(__FILE__)) . '/../../../lib/openpayu.php'; require_once realpath(dirname(__FILE__)) . '/../../config.php'; $currentToken = $_SESSION['current_token']; $order = array( 'customerIp' => '127.0.0.1', 'notifyUrl' => 'http://oskartestserver.net/examples/v2/order/Notify.php', 'merchantPosId' =>'185641', 'continueUrl' =>'http://oskartestserver.net/positive', 'description' => 'popis transakce', 'currencyCode' => 'CZK', 'totalAmount' => '999', 'buyer' => array( 'email' => 'email@exampledomain.com', 'firstName' => 'Jan', 'lastName' => 'Novak', 'delivery' => array( 'recipientName' => 'Jan Novak', 'countryCode' => 'CZ') ), 'products' => array( array('name' => 'Mouse', 'unitPrice' => '999', 'quantity' => '1') ), 'payMethods' => array( 'payMethod' => array( 'type' =>'CARD_TOKEN', 'value' => $currentToken) ), 'settings' => array( 'agreement' => 'true') ); ?> <!doctype html> <html lang="en-US"> <head> <meta charset="UTF-8"> <title>Create Order - OpenPayU v2</title> <link rel="stylesheet" href="../../layout/css/bootstrap.min.css"> <link rel="stylesheet" href="../../layout/css/style.css"> </head> <body> <div class="container"> <div class="page-header"> <h1>Create Order - OpenPayU v2</h1> </div> <?php try { $response = OpenPayU_Order::create($order); $status_desc = OpenPayU_Util::statusDesc($response->getStatus()); if($response->getStatus() == 'SUCCESS'){ echo '<div class="alert alert-success">SUCCESS: '.$status_desc; echo '</div>'; }else{ echo '<div class="alert alert-warning">'.$response->getStatus().': '.$status_desc; echo '</div>'; } }catch (OpenPayU_Exception $e){ echo '<pre>'; var_dump((string)$e); echo '</pre>'; } ?> <h1>Request</h1> <div id="unregisteredCardData"> <?php var_dump($order); ?> </div> <table class="table table-hover table-bordered"> <thead> <tr> <th colspan="2">Important data from response</th> </tr> </thead> <tbody> <tr> <td>Order status</td> <td><?= $response->getStatus() ?></td> </tr> <tr> <td>Order id</td> <td><?= $response->getResponse()->orderId ?></td> <?php file_put_contents(__DIR__.'/orderID.log', $response->getResponse()->orderId); ?> </tr> <tr> <td>Redirect Uri</td> <td><a href="<?= $response->getResponse()->redirectUri ?>"><?= $response->getResponse()->redirectUri ?></a> </td> </tr> </tbody> </table> <h1>Response</h1> <div id="unregisteredCardData"> <?php var_dump($response); ?> </div> </div> </html>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 56, Position 2 = 60
Branch analysis from position: 56
1 jumps found. (Code = 42) Position 1 = 67
Branch analysis from position: 67
1 jumps found. (Code = 42) Position 1 = 75
Branch analysis from position: 75
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 60
1 jumps found. (Code = 42) Position 1 = 75
Branch analysis from position: 75
Found catch point at position: 68
Branch analysis from position: 68
2 jumps found. (Code = 107) Position 1 = 69, Position 2 = -2
Branch analysis from position: 69
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sW5uc
function name:  (null)
number of ops:  112
compiled vars:  !0 = $currentToken, !1 = $order, !2 = $response, !3 = $status_desc, !4 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'session_start'
          1        DO_ICALL                                                 
   16     2        INIT_FCALL                                               'var_dump'
          3        FETCH_R                      global              ~6      '_SESSION'
          4        FETCH_DIM_R                                      ~7      ~6, 'current_token'
          5        SEND_VAL                                                 ~7
          6        DO_ICALL                                                 
   18     7        INIT_FCALL                                               'realpath'
          8        INIT_FCALL                                               'dirname'
          9        SEND_VAL                                                 '%2Fin%2FsW5uc'
         10        DO_ICALL                                         $9      
         11        SEND_VAR                                                 $9
         12        DO_ICALL                                         $10     
         13        CONCAT                                           ~11     $10, '%2F..%2F..%2F..%2Flib%2Fopenpayu.php'
         14        INCLUDE_OR_EVAL                                          ~11, REQUIRE_ONCE
   19    15        INIT_FCALL                                               'realpath'
         16        INIT_FCALL                                               'dirname'
         17        SEND_VAL                                                 '%2Fin%2FsW5uc'
         18        DO_ICALL                                         $13     
         19        SEND_VAR                                                 $13
         20        DO_ICALL                                         $14     
         21        CONCAT                                           ~15     $14, '%2F..%2F..%2Fconfig.php'
         22        INCLUDE_OR_EVAL                                          ~15, REQUIRE_ONCE
   22    23        FETCH_R                      global              ~17     '_SESSION'
         24        FETCH_DIM_R                                      ~18     ~17, 'current_token'
         25        ASSIGN                                                   !0, ~18
   25    26        INIT_ARRAY                                       ~20     '127.0.0.1', 'customerIp'
   26    27        ADD_ARRAY_ELEMENT                                ~20     'http%3A%2F%2Foskartestserver.net%2Fexamples%2Fv2%2Forder%2FNotify.php', 'notifyUrl'
   27    28        ADD_ARRAY_ELEMENT                                ~20     '185641', 'merchantPosId'
   28    29        ADD_ARRAY_ELEMENT                                ~20     'http%3A%2F%2Foskartestserver.net%2Fpositive', 'continueUrl'
   29    30        ADD_ARRAY_ELEMENT                                ~20     'popis+transakce', 'description'
   30    31        ADD_ARRAY_ELEMENT                                ~20     'CZK', 'currencyCode'
   31    32        ADD_ARRAY_ELEMENT                                ~20     '999', 'totalAmount'
   25    33        ADD_ARRAY_ELEMENT                                ~20     <array>, 'buyer'
         34        ADD_ARRAY_ELEMENT                                ~20     <array>, 'products'
   46    35        INIT_ARRAY                                       ~21     'CARD_TOKEN', 'type'
   47    36        ADD_ARRAY_ELEMENT                                ~21     !0, 'value'
         37        INIT_ARRAY                                       ~22     ~21, 'payMethod'
         38        ADD_ARRAY_ELEMENT                                ~20     ~22, 'payMethods'
   25    39        ADD_ARRAY_ELEMENT                                ~20     <array>, 'settings'
   24    40        ASSIGN                                                   !1, ~20
   55    41        ECHO                                                     '%3C%21doctype+html%3E%0A%3Chtml+lang%3D%22en-US%22%3E%0A%3Chead%3E%0A++++%3Cmeta+charset%3D%22UTF-8%22%3E%0A++++%3Ctitle%3ECreate+Order+-+OpenPayU+v2%3C%2Ftitle%3E%0A++++%3Clink+rel%3D%22stylesheet%22+href%3D%22..%2F..%2Flayout%2Fcss%2Fbootstrap.min.css%22%3E%0A++++%3Clink+rel%3D%22stylesheet%22+href%3D%22..%2F..%2Flayout%2Fcss%2Fstyle.css%22%3E%0A%3C%2Fhead%3E%0A%0A%3Cbody%3E%0A%3Cdiv+class%3D%22container%22%3E%0A++++%3Cdiv+class%3D%22page-header%22%3E%0A++++++++%3Ch1%3ECreate+Order+-+OpenPayU+v2%3C%2Fh1%3E%0A++++%3C%2Fdiv%3E%0A++++'
   70    42        INIT_STATIC_METHOD_CALL                                  'OpenPayU_Order', 'create'
         43        SEND_VAR_EX                                              !1
         44        DO_FCALL                                      0  $24     
         45        ASSIGN                                                   !2, $24
   71    46        INIT_STATIC_METHOD_CALL                                  'OpenPayU_Util', 'statusDesc'
         47        INIT_METHOD_CALL                                         !2, 'getStatus'
         48        DO_FCALL                                      0  $26     
         49        SEND_VAR_NO_REF_EX                                       $26
         50        DO_FCALL                                      0  $27     
         51        ASSIGN                                                   !3, $27
   72    52        INIT_METHOD_CALL                                         !2, 'getStatus'
         53        DO_FCALL                                      0  $29     
         54        IS_EQUAL                                                 $29, 'SUCCESS'
         55      > JMPZ                                                     ~30, ->60
   73    56    >   CONCAT                                           ~31     '%3Cdiv+class%3D%22alert+alert-success%22%3ESUCCESS%3A+', !3
         57        ECHO                                                     ~31
   74    58        ECHO                                                     '%3C%2Fdiv%3E'
         59      > JMP                                                      ->67
   76    60    >   INIT_METHOD_CALL                                         !2, 'getStatus'
         61        DO_FCALL                                      0  $32     
         62        CONCAT                                           ~33     '%3Cdiv+class%3D%22alert+alert-warning%22%3E', $32
         63        CONCAT                                           ~34     ~33, '%3A+'
         64        CONCAT                                           ~35     ~34, !3
         65        ECHO                                                     ~35
   77    66        ECHO                                                     '%3C%2Fdiv%3E'
         67    > > JMP                                                      ->75
   79    68  E > > CATCH                                       last         'OpenPayU_Exception'
   80    69    >   ECHO                                                     '%3Cpre%3E'
   81    70        INIT_FCALL                                               'var_dump'
         71        CAST                                          6  ~36     !4
         72        SEND_VAL                                                 ~36
         73        DO_ICALL                                                 
   82    74        ECHO                                                     '%3C%2Fpre%3E'
   85    75    >   ECHO                                                     '%0A++++%3Ch1%3ERequest%3C%2Fh1%3E%0A%0A++++%3Cdiv+id%3D%22unregisteredCardData%22%3E%0A++++++++'
   89    76        INIT_FCALL                                               'var_dump'
         77        SEND_VAR                                                 !1
         78        DO_ICALL                                                 
   90    79        ECHO                                                     '++++%3C%2Fdiv%3E%0A%0A++++%3Ctable+class%3D%22table+table-hover+table-bordered%22%3E%0A++++++++%3Cthead%3E%0A++++++++%3Ctr%3E%0A++++++++++++%3Cth+colspan%3D%222%22%3EImportant+data+from+response%3C%2Fth%3E%0A++++++++%3C%2Ftr%3E%0A++++++++%3C%2Fthead%3E%0A++++++++%3Ctbody%3E%0A++++++++%3Ctr%3E%0A++++++++++++%3Ctd%3EOrder+status%3C%2Ftd%3E%0A++++++++++++%3Ctd%3E'
  101    80        INIT_METHOD_CALL                                         !2, 'getStatus'
         81        DO_FCALL                                      0  $39     
         82        ECHO                                                     $39
         83        ECHO                                                     '%3C%2Ftd%3E%0A++++++++%3C%2Ftr%3E%0A++++++++%3Ctr%3E%0A++++++++++++%3Ctd%3EOrder+id%3C%2Ftd%3E%0A++++++++++++%3Ctd%3E'
  105    84        INIT_METHOD_CALL                                         !2, 'getResponse'
         85        DO_FCALL                                      0  $40     
         86        FETCH_OBJ_R                                      ~41     $40, 'orderId'
         87        ECHO                                                     ~41
         88        ECHO                                                     '%3C%2Ftd%3E%0A'
  107    89        INIT_FCALL                                               'file_put_contents'
         90        SEND_VAL                                                 '%2Fin%2ForderID.log'
         91        INIT_METHOD_CALL                                         !2, 'getResponse'
         92        DO_FCALL                                      0  $42     
         93        FETCH_OBJ_R                                      ~43     $42, 'orderId'
         94        SEND_VAL                                                 ~43
         95        DO_ICALL                                                 
  108    96        ECHO                                                     '++++++++%3C%2Ftr%3E%0A++++++++%3Ctr%3E%0A++++++++++++%3Ctd%3ERedirect+Uri%3C%2Ftd%3E%0A++++++++++++%3Ctd%3E%3Ca+href%3D%22'
  111    97        INIT_METHOD_CALL                                         !2, 'getResponse'
         98        DO_FCALL                                      0  $45     
         99        FETCH_OBJ_R                                      ~46     $45, 'redirectUri'
        100        ECHO                                                     ~46
        101        ECHO                                                     '%22%3E'
        102        INIT_METHOD_CALL                                         !2, 'getResponse'
        103        DO_FCALL                                      0  $47     
        104        FETCH_OBJ_R                                      ~48     $47, 'redirectUri'
        105        ECHO                                                     ~48
        106        ECHO                                                     '%3C%2Fa%3E%0A++++++++++++%3C%2Ftd%3E%0A++++++++%3C%2Ftr%3E%0A++++++++%3C%2Ftbody%3E%0A++++%3C%2Ftable%3E%0A++++%3Ch1%3EResponse%3C%2Fh1%3E%0A%0A++++%3Cdiv+id%3D%22unregisteredCardData%22%3E%0A++++++++'
  119   107        INIT_FCALL                                               'var_dump'
        108        SEND_VAR                                                 !2
        109        DO_ICALL                                                 
  120   110        ECHO                                                     '++++%3C%2Fdiv%3E%0A%3C%2Fdiv%3E%0A%3C%2Fhtml%3E'
  122   111      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.04 ms | 1408 KiB | 23 Q