3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = "/(%\S*)/"; $replacement = "%s"; $input_str = "Controller '%d is potentially leaking. All controllers are supposed to have an empty reference count. If this is a non synch sound controller, then script will need to make sure to clean it up."; $messageParameters = ["CVSNyz368g="]; if (preg_match_all($pattern, $input_str, $matches_out)) { $printfCodes = $matches_out[1]; foreach ($printfCodes as $index => $printfCode) { if ($printfCode != "%s" && $printfCode != "%c") { $decodedIntAsString = $messageParameters[$index] . " translated!"; $messageParameters[$index] = $decodedIntAsString; } } } print_r( $messageParameters);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 27
Branch analysis from position: 10
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 26
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 26
Branch analysis from position: 14
2 jumps found. (Code = 46) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 25
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 25
Branch analysis from position: 19
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
Branch analysis from position: 27
filename:       /in/WWWVu
function name:  (null)
number of ops:  31
compiled vars:  !0 = $pattern, !1 = $replacement, !2 = $input_str, !3 = $messageParameters, !4 = $matches_out, !5 = $printfCodes, !6 = $printfCode, !7 = $index, !8 = $decodedIntAsString
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2F%28%25%5CS%2A%29%2F'
    4     1        ASSIGN                                                   !1, '%25s'
    5     2        ASSIGN                                                   !2, 'Controller+%27%25d+is+potentially+leaking.++All+controllers+are+supposed+to+have+an+empty+reference+count.++If+this+is+a+non+synch+sound+controller%2C+then+script+will+need+to+make+sure+to+clean+it+up.'
    6     3        ASSIGN                                                   !3, <array>
    8     4        INIT_FCALL                                               'preg_match_all'
          5        SEND_VAR                                                 !0
          6        SEND_VAR                                                 !2
          7        SEND_REF                                                 !4
          8        DO_ICALL                                         $13     
          9      > JMPZ                                                     $13, ->27
    9    10    >   FETCH_DIM_R                                      ~14     !4, 1
         11        ASSIGN                                                   !5, ~14
   10    12      > FE_RESET_R                                       $16     !5, ->26
         13    > > FE_FETCH_R                                       ~17     $16, !6, ->26
         14    >   ASSIGN                                                   !7, ~17
   11    15        IS_NOT_EQUAL                                     ~19     !6, '%25s'
         16      > JMPZ_EX                                          ~19     ~19, ->19
         17    >   IS_NOT_EQUAL                                     ~20     !6, '%25c'
         18        BOOL                                             ~19     ~20
         19    > > JMPZ                                                     ~19, ->25
   12    20    >   FETCH_DIM_R                                      ~21     !3, !7
         21        CONCAT                                           ~22     ~21, '+translated%21'
         22        ASSIGN                                                   !8, ~22
   13    23        ASSIGN_DIM                                               !3, !7
         24        OP_DATA                                                  !8
   10    25    > > JMP                                                      ->13
         26    >   FE_FREE                                                  $16
   18    27    >   INIT_FCALL                                               'print_r'
         28        SEND_VAR                                                 !3
         29        DO_ICALL                                                 
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.1 ms | 1400 KiB | 17 Q