3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = [ [ 'hash' => '0xa35b44d7e2ff09f2c936d04ad53f472b3cae46b449ddd307b3bb0a9aa67aa7a0', 'from' => '0x87fdc1fd91cb8a7db0021f1d749027b7048874cb', 'to' => '0xe460c28e4ce2e4ae0b934a3eeb8fd88134d26956' ], [ 'hash' =>'0x3f85168d763793e350b4273c531b055d37121b170a48675ba5decd80b62442d5', 'from' => '0xe460c28e4ce2e4ae0b934a3eeb8fd88134d26956', 'to' => '0x1faae436c85a15f257f7ff7f02af1e608815bbd7' ], [ 'hash' => '0x621de75f0a2a880e17efc2c40a310223c38fa19b71b2dae375a9bc4d4d794a1a', 'from' => '0xe460c28e4ce2e4ae0b934a3eeb8fd88134d26956', 'to' => '0x1faae436c85a15f257f7ff7f02af1e608815bbd7' ], [ 'hash' => '0x4a32e142b627a1541d0dc5605ef9c52b7f586f02ab502d13d0503321622ba435', 'from' => '0xe460c28e4ce2e4ae0b934a3eeb8fd88134d26956', 'to' => '0x1faae436c85a15f257f7ff7f02af1e608815bbd7' ], [ 'hash' => '0x0b40f67a334aae4cd54977e5e4cd5f54a2157f75441d5143d1eed4ba70f19b8f', 'from' => '0xe460c28e4ce2e4ae0b934a3eeb8fd88134d26956', 'to' => '0x1faae436c85a15f257f7ff7f02af1e608815bbd7' ] ]; $pa = strtolower('0xE460c28E4cE2e4aE0B934a3eeb8FD88134d26956'); $result = ['from' => [], 'to' => []]; foreach ($data as $set) { if ($pa == $set['from']) { $result['Sent'][] = $set['hash']; } elseif ($pa == $set['to']) { $result['Received'][] = $set['hash']; } } echo "For $pa\n"; echo "Sent Transactions:\n\t" , implode("\n\t", $result['Sent']) , "\n"; echo "Received Transactions:\n\t" , implode("\n\t", $result['Received']);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 24
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 24
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 23
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 23
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/P2GhE
function name:  (null)
number of ops:  45
compiled vars:  !0 = $data, !1 = $pa, !2 = $result, !3 = $set
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   29     1        INIT_FCALL                                               'strtolower'
          2        SEND_VAL                                                 '0xE460c28E4cE2e4aE0B934a3eeb8FD88134d26956'
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
   31     5        ASSIGN                                                   !2, <array>
   32     6      > FE_RESET_R                                       $8      !0, ->24
          7    > > FE_FETCH_R                                               $8, !3, ->24
   33     8    >   FETCH_DIM_R                                      ~9      !3, 'from'
          9        IS_EQUAL                                                 !1, ~9
         10      > JMPZ                                                     ~10, ->16
   34    11    >   FETCH_DIM_R                                      ~13     !3, 'hash'
         12        FETCH_DIM_W                                      $11     !2, 'Sent'
         13        ASSIGN_DIM                                               $11
         14        OP_DATA                                                  ~13
   33    15      > JMP                                                      ->23
   35    16    >   FETCH_DIM_R                                      ~14     !3, 'to'
         17        IS_EQUAL                                                 !1, ~14
         18      > JMPZ                                                     ~15, ->23
   36    19    >   FETCH_DIM_R                                      ~18     !3, 'hash'
         20        FETCH_DIM_W                                      $16     !2, 'Received'
         21        ASSIGN_DIM                                               $16
         22        OP_DATA                                                  ~18
   32    23    > > JMP                                                      ->7
         24    >   FE_FREE                                                  $8
   40    25        ROPE_INIT                                     3  ~20     'For+'
         26        ROPE_ADD                                      1  ~20     ~20, !1
         27        ROPE_END                                      2  ~19     ~20, '%0A'
         28        ECHO                                                     ~19
   41    29        ECHO                                                     'Sent+Transactions%3A%0A%09'
         30        INIT_FCALL                                               'implode'
         31        SEND_VAL                                                 '%0A%09'
         32        FETCH_DIM_R                                      ~22     !2, 'Sent'
         33        SEND_VAL                                                 ~22
         34        DO_ICALL                                         $23     
         35        ECHO                                                     $23
         36        ECHO                                                     '%0A'
   42    37        ECHO                                                     'Received+Transactions%3A%0A%09'
         38        INIT_FCALL                                               'implode'
         39        SEND_VAL                                                 '%0A%09'
         40        FETCH_DIM_R                                      ~24     !2, 'Received'
         41        SEND_VAL                                                 ~24
         42        DO_ICALL                                         $25     
         43        ECHO                                                     $25
         44      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.99 ms | 1006 KiB | 15 Q