3v4l.org

run code in 300+ PHP versions simultaneously
<?php $json = <<<_JSON { "result": { "_raw": "Jun 30 06:51:04 blablabla.com apache2: event_id=\"something\" event=\"something\" app=\"testapp\" serial_number=\"066f1cda\" revoke_reason=\"key compromise\" revoke_comment=\"xxxxxx\" delay_revoke=\"15\" url=\"/blablabla.php\" account_id=\"123456\" user_id=\"xxxxxxx\" staff_id=\"xxxx\" staff_name=\"todd\" ip_address=\"123.123.123.123\"", "splunk_server": "splunkin02.localhost.com" } } _JSON; $raw = json_decode($json)->result->_raw; $marker = 'apache2: '; $startAt = strpos($raw, $marker) + strlen($marker); preg_match_all('/(\w+)="(.*?)"/', $raw, $matches, PREG_PATTERN_ORDER, $startAt); $result = array_combine($matches[1], $matches[2]); print_r($result);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/idlRs
function name:  (null)
number of ops:  33
compiled vars:  !0 = $json, !1 = $raw, !2 = $marker, !3 = $startAt, !4 = $matches, !5 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7B%0A++++%22result%22%3A+%7B%0A++++++++%22_raw%22%3A+%22Jun+30+06%3A51%3A04+blablabla.com+apache2%3A+event_id%3D%5C%22something%5C%22+event%3D%5C%22something%5C%22+app%3D%5C%22testapp%5C%22+serial_number%3D%5C%22066f1cda%5C%22+revoke_reason%3D%5C%22key+compromise%5C%22+revoke_comment%3D%5C%22xxxxxx%5C%22+delay_revoke%3D%5C%2215%5C%22+url%3D%5C%22%2Fblablabla.php%5C%22+account_id%3D%5C%22123456%5C%22+user_id%3D%5C%22xxxxxxx%5C%22+staff_id%3D%5C%22xxxx%5C%22+staff_name%3D%5C%22todd%5C%22+ip_address%3D%5C%22123.123.123.123%5C%22%22%2C%0A++++++++%22splunk_server%22%3A+%22splunkin02.localhost.com%22%0A++++%7D%0A%7D'
   12     1        INIT_FCALL                                               'json_decode'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $7      
          4        FETCH_OBJ_R                                      ~8      $7, 'result'
          5        FETCH_OBJ_R                                      ~9      ~8, '_raw'
          6        ASSIGN                                                   !1, ~9
   14     7        ASSIGN                                                   !2, 'apache2%3A+'
   15     8        INIT_FCALL                                               'strpos'
          9        SEND_VAR                                                 !1
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                         $12     
         12        STRLEN                                           ~13     !2
         13        ADD                                              ~14     $12, ~13
         14        ASSIGN                                                   !3, ~14
   17    15        INIT_FCALL                                               'preg_match_all'
         16        SEND_VAL                                                 '%2F%28%5Cw%2B%29%3D%22%28.%2A%3F%29%22%2F'
         17        SEND_VAR                                                 !1
         18        SEND_REF                                                 !4
         19        SEND_VAL                                                 1
         20        SEND_VAR                                                 !3
         21        DO_ICALL                                                 
   19    22        INIT_FCALL                                               'array_combine'
         23        FETCH_DIM_R                                      ~17     !4, 1
         24        SEND_VAL                                                 ~17
         25        FETCH_DIM_R                                      ~18     !4, 2
         26        SEND_VAL                                                 ~18
         27        DO_ICALL                                         $19     
         28        ASSIGN                                                   !5, $19
   21    29        INIT_FCALL                                               'print_r'
         30        SEND_VAR                                                 !5
         31        DO_ICALL                                                 
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.87 ms | 1010 KiB | 18 Q