3v4l.org

run code in 300+ PHP versions simultaneously
<?php function set_convert_info($file, $country, $test) { // test if ((int)str_replace('TP', '', $test) === 1) { echo "TEST TRUE\n"; } // country echo strtoupper($country) . "\n"; // file info $has_file_info = preg_match( '/^F(ASF|LBF)?X(.+)$/', $file, $file_info ); echo "FILE INFO: " . (string)$has_file_info . "\n"; } parse_str('transaction_subject=Plus Monthly Subscription&payment_date=04:39:40 Nov 20, 2015 PST&txn_type=subscr_payment&subscr_id=I-4GXT1TST7VUF&last_name=hakki&residence_country=AU&item_name=Plus Monthly Subscription&payment_gross=2.99&mc_currency=USD&business=payment@mobile9.com&payment_type=instant&protection_eligibility=Partially Eligible - Unauth Only&verify_sign=Anh.d8D9aiz0KVpGadUtN89QFkgKAq.xzmf0vOAE3LuVPvWFJ0FKiTvI&payer_status=verified&payer_email=underthecovers@iinet.net.au&txn_id=58P89968DA177754R&receiver_email=payment@mobile9.com&first_name=amanda&payer_id=AMETCW2ENDZGU&receiver_id=HNFJ3VJEEY4SA&item_number=MM|977383&payment_status=Completed&payment_fee=0.43&mc_fee=0.43&mc_gross=2.99&charset=windows-1252&notify_version=3.8&ipn_track_id=2a5002329ba04', $str); $item = explode('|', $str['item_number']); list($type, $payment_id, $convert_type, $medium, $geo, $file, $test) = $item; set_convert_info($file, $geo, $test); echo "\n\n"; ksort($str); foreach ($str as $key => $value) { echo $key . ': ' . $value . "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 36, Position 2 = 43
Branch analysis from position: 36
2 jumps found. (Code = 78) Position 1 = 37, Position 2 = 43
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
Branch analysis from position: 43
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 43
filename:       /in/RVUk5
function name:  (null)
number of ops:  45
compiled vars:  !0 = $str, !1 = $item, !2 = $type, !3 = $payment_id, !4 = $convert_type, !5 = $medium, !6 = $geo, !7 = $file, !8 = $test, !9 = $value, !10 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_FCALL                                               'parse_str'
          1        SEND_VAL                                                 'transaction_subject%3DPlus+Monthly+Subscription%26payment_date%3D04%3A39%3A40+Nov+20%2C+2015+PST%26txn_type%3Dsubscr_payment%26subscr_id%3DI-4GXT1TST7VUF%26last_name%3Dhakki%26residence_country%3DAU%26item_name%3DPlus+Monthly+Subscription%26payment_gross%3D2.99%26mc_currency%3DUSD%26business%3Dpayment%40mobile9.com%26payment_type%3Dinstant%26protection_eligibility%3DPartially+Eligible+-+Unauth+Only%26verify_sign%3DAnh.d8D9aiz0KVpGadUtN89QFkgKAq.xzmf0vOAE3LuVPvWFJ0FKiTvI%26payer_status%3Dverified%26payer_email%3Dunderthecovers%40iinet.net.au%26txn_id%3D58P89968DA177754R%26receiver_email%3Dpayment%40mobile9.com%26first_name%3Damanda%26payer_id%3DAMETCW2ENDZGU%26receiver_id%3DHNFJ3VJEEY4SA%26item_number%3DMM%7C977383%26payment_status%3DCompleted%26payment_fee%3D0.43%26mc_fee%3D0.43%26mc_gross%3D2.99%26charset%3Dwindows-1252%26notify_version%3D3.8%26ipn_track_id%3D2a5002329ba04'
          2        SEND_REF                                                 !0
          3        DO_ICALL                                                 
   24     4        INIT_FCALL                                               'explode'
          5        SEND_VAL                                                 '%7C'
          6        FETCH_DIM_R                                      ~12     !0, 'item_number'
          7        SEND_VAL                                                 ~12
          8        DO_ICALL                                         $13     
          9        ASSIGN                                                   !1, $13
   25    10        QM_ASSIGN                                        ~15     !1
         11        FETCH_LIST_R                                     $16     ~15, 0
         12        ASSIGN                                                   !2, $16
         13        FETCH_LIST_R                                     $18     ~15, 1
         14        ASSIGN                                                   !3, $18
         15        FETCH_LIST_R                                     $20     ~15, 2
         16        ASSIGN                                                   !4, $20
         17        FETCH_LIST_R                                     $22     ~15, 3
         18        ASSIGN                                                   !5, $22
         19        FETCH_LIST_R                                     $24     ~15, 4
         20        ASSIGN                                                   !6, $24
         21        FETCH_LIST_R                                     $26     ~15, 5
         22        ASSIGN                                                   !7, $26
         23        FETCH_LIST_R                                     $28     ~15, 6
         24        ASSIGN                                                   !8, $28
         25        FREE                                                     ~15
   26    26        INIT_FCALL                                               'set_convert_info'
         27        SEND_VAR                                                 !7
         28        SEND_VAR                                                 !6
         29        SEND_VAR                                                 !8
         30        DO_FCALL                                      0          
   27    31        ECHO                                                     '%0A%0A'
   29    32        INIT_FCALL                                               'ksort'
         33        SEND_REF                                                 !0
         34        DO_ICALL                                                 
   31    35      > FE_RESET_R                                       $32     !0, ->43
         36    > > FE_FETCH_R                                       ~33     $32, !9, ->43
         37    >   ASSIGN                                                   !10, ~33
   32    38        CONCAT                                           ~35     !10, '%3A+'
         39        CONCAT                                           ~36     ~35, !9
         40        CONCAT                                           ~37     ~36, '%0A'
         41        ECHO                                                     ~37
   31    42      > JMP                                                      ->36
         43    >   FE_FREE                                                  $32
   33    44      > RETURN                                                   1

Function set_convert_info:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/RVUk5
function name:  set_convert_info
number of ops:  28
compiled vars:  !0 = $file, !1 = $country, !2 = $test, !3 = $has_file_info, !4 = $file_info
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    5     3        INIT_FCALL                                               'str_replace'
          4        SEND_VAL                                                 'TP'
          5        SEND_VAL                                                 ''
          6        SEND_VAR                                                 !2
          7        DO_ICALL                                         $5      
          8        CAST                                          4  ~6      $5
          9        IS_IDENTICAL                                             ~6, 1
         10      > JMPZ                                                     ~7, ->12
    6    11    >   ECHO                                                     'TEST+TRUE%0A'
   10    12    >   INIT_FCALL                                               'strtoupper'
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $8      
         15        CONCAT                                           ~9      $8, '%0A'
         16        ECHO                                                     ~9
   13    17        INIT_FCALL                                               'preg_match'
   14    18        SEND_VAL                                                 '%2F%5EF%28ASF%7CLBF%29%3FX%28.%2B%29%24%2F'
   15    19        SEND_VAR                                                 !0
   16    20        SEND_REF                                                 !4
         21        DO_ICALL                                         $10     
   13    22        ASSIGN                                                   !3, $10
   19    23        CAST                                          6  ~12     !3
         24        CONCAT                                           ~13     'FILE+INFO%3A+', ~12
         25        CONCAT                                           ~14     ~13, '%0A'
         26        ECHO                                                     ~14
   20    27      > RETURN                                                   null

End of function set_convert_info

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.17 ms | 1398 KiB | 26 Q