3v4l.org

run code in 500+ PHP versions simultaneously
<?php $txt = <<<TXT Foodbar: +8; Barredfu: -91% TXT; $result = []; foreach (explode("\n", $txt) as $line) { [ $attr, $result[$attr]['sign'], $result[$attr]['numb'], $result[$attr]['perc'] ] = sscanf($line, '%[^:]: %[+-]%d%[%]'); } var_export($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 28
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 28
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
filename:       /in/DEnpd
function name:  (null)
number of ops:  33
compiled vars:  !0 = $txt, !1 = $result, !2 = $line, !3 = $attr
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'Foodbar%3A+%2B8%3B%0ABarredfu%3A+-91%25'
    8     1        ASSIGN                                                       !1, <array>
    9     2        INIT_FCALL                                                   'explode'
          3        SEND_VAL                                                     '%0A'
          4        SEND_VAR                                                     !0
          5        DO_ICALL                                             $6      
          6      > FE_RESET_R                                           $7      $6, ->28
          7    > > FE_FETCH_R                                                   $7, !2, ->28
   15     8    >   INIT_FCALL                                                   'sscanf'
          9        SEND_VAR                                                     !2
         10        SEND_VAL                                                     '%25%5B%5E%3A%5D%3A+%25%5B%2B-%5D%25d%25%5B%25%5D'
         11        DO_ICALL                                             $8      
         12        FETCH_LIST_R                                         $9      $8, 0
   11    13        ASSIGN                                                       !3, $9
         14        FETCH_LIST_R                                         $11     $8, 1
   12    15        FETCH_DIM_W                                          $12     !1, !3
         16        ASSIGN_DIM                                                   $12, 'sign'
   11    17        OP_DATA                                                      $11
         18        FETCH_LIST_R                                         $14     $8, 2
   13    19        FETCH_DIM_W                                          $15     !1, !3
         20        ASSIGN_DIM                                                   $15, 'numb'
   11    21        OP_DATA                                                      $14
         22        FETCH_LIST_R                                         $17     $8, 3
   14    23        FETCH_DIM_W                                          $18     !1, !3
         24        ASSIGN_DIM                                                   $18, 'perc'
   11    25        OP_DATA                                                      $17
         26        FREE                                                         $8
    9    27      > JMP                                                          ->7
         28    >   FE_FREE                                                      $7
   17    29        INIT_FCALL                                                   'var_export'
         30        SEND_VAR                                                     !1
         31        DO_ICALL                                                     
         32      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
166.68 ms | 1324 KiB | 16 Q