3v4l.org

run code in 500+ PHP versions simultaneously
<?php $line = "INF Chat (from 'Steam_76561198379194238', entity id '1298', to 'Global'): 'DavSlo': !test"; $parts = explode("'", $line); $steam_id = $parts[1]; $entity_id = $parts[3]; $chat_audience = $parts[5]; $player_name = $parts[7]; $message_text = ltrim($parts[8], ": "); echo "steam_id: $steam_id\n"; echo "entity_id: $entity_id\n"; echo "chat_audience: $chat_audience\n"; echo "player_name: $player_name\n"; echo "message_text: $message_text\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZA5D2
function name:  (null)
number of ops:  41
compiled vars:  !0 = $line, !1 = $parts, !2 = $steam_id, !3 = $entity_id, !4 = $chat_audience, !5 = $player_name, !6 = $message_text
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'INF+Chat+%28from+%27Steam_76561198379194238%27%2C+entity+id+%271298%27%2C+to+%27Global%27%29%3A+%27DavSlo%27%3A+%21test'
    5     1        INIT_FCALL                                                   'explode'
          2        SEND_VAL                                                     '%27'
          3        SEND_VAR                                                     !0
          4        DO_ICALL                                             $8      
          5        ASSIGN                                                       !1, $8
    6     6        FETCH_DIM_R                                          ~10     !1, 1
          7        ASSIGN                                                       !2, ~10
    7     8        FETCH_DIM_R                                          ~12     !1, 3
          9        ASSIGN                                                       !3, ~12
    8    10        FETCH_DIM_R                                          ~14     !1, 5
         11        ASSIGN                                                       !4, ~14
    9    12        FETCH_DIM_R                                          ~16     !1, 7
         13        ASSIGN                                                       !5, ~16
   10    14        INIT_FCALL                                                   'ltrim'
         15        FETCH_DIM_R                                          ~18     !1, 8
         16        SEND_VAL                                                     ~18
         17        SEND_VAL                                                     '%3A+'
         18        DO_ICALL                                             $19     
         19        ASSIGN                                                       !6, $19
   12    20        ROPE_INIT                                         3  ~22     'steam_id%3A++++++'
         21        ROPE_ADD                                          1  ~22     ~22, !2
         22        ROPE_END                                          2  ~21     ~22, '%0A'
         23        ECHO                                                         ~21
   13    24        ROPE_INIT                                         3  ~25     'entity_id%3A+++++'
         25        ROPE_ADD                                          1  ~25     ~25, !3
         26        ROPE_END                                          2  ~24     ~25, '%0A'
         27        ECHO                                                         ~24
   14    28        ROPE_INIT                                         3  ~28     'chat_audience%3A+'
         29        ROPE_ADD                                          1  ~28     ~28, !4
         30        ROPE_END                                          2  ~27     ~28, '%0A'
         31        ECHO                                                         ~27
   15    32        ROPE_INIT                                         3  ~31     'player_name%3A+++'
         33        ROPE_ADD                                          1  ~31     ~31, !5
         34        ROPE_END                                          2  ~30     ~31, '%0A'
         35        ECHO                                                         ~30
   16    36        ROPE_INIT                                         3  ~34     'message_text%3A++'
         37        ROPE_ADD                                          1  ~34     ~34, !6
         38        ROPE_END                                          2  ~33     ~34, '%0A'
         39        ECHO                                                         ~33
         40      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
164.9 ms | 1163 KiB | 15 Q