3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$payload = file_get_contents('./csp-log.log'); $payload = "{\"csp-report\":{\"document-uri\":\"http://athleticssite.com/\", \"referrer\":\"\", \"violated-directive\":\"img-src\", \"effective-directive\":\"img-src\", \"original-policy\":\"default-src 'self' https://someurl.com; script-src 'self' 'unsafe-inline' https://use.typekit.com https://google-analytics.com https://ajax.googleapis.com https://js.hsforms.net https://ssl.google-analytics.com; img-src 'self' https://p.typekit.net https://ssl.google-analytics.com ; font-src https://use.typekit.com; report-uri /csp-violations-report-endpoint/;\", \"disposition\":\"report\", \"blocked-uri\":\"https://someurl.com/path/to/file/516.large.jpg?1530632190456\", \"status-code\":200, \"script-sample\":\"\"}} {\"csp-report\":{\"document-uri\":\"http://athleticssite.com/\", \"referrer\":\"\", \"violated-directive\":\"img-src\", \"effective-directive\":\"img-src\", \"original-policy\":\"default-src 'self' https://someurl.com; script-src 'self' 'unsafe-inline' https://use.typekit.com https://google-analytics.com https://ajax.googleapis.com https://js.hsforms.net https://ssl.google-analytics.com; img-src 'self' https://p.typekit.net https://ssl.google-analytics.com ; font-src https://use.typekit.com; report-uri /csp-violations-report-endpoint/;\", \"disposition\":\"report\", \"blocked-uri\":\"https://someurl.com/path/to/file/516.large.jpg?1530632190456\", \"status-code\":200, \"script-sample\":\"\"}}"; $matches = []; preg_match_all('/"blocked-uri":"(.*?)",/m', $payload, $matches); /* for($i = 0; $i < count($matches[1]); $i++) { echo $matches[1][$i] . "\n"; } */ foreach($matches as $match => $uri) { echo $uri[1] . "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 14
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/Imtin
function name:  (null)
number of ops:  16
compiled vars:  !0 = $payload, !1 = $matches, !2 = $uri, !3 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, '%7B%22csp-report%22%3A%7B%22document-uri%22%3A%22http%3A%2F%2Fathleticssite.com%2F%22%2C%0A%22referrer%22%3A%22%22%2C%0A%22violated-directive%22%3A%22img-src%22%2C%0A%22effective-directive%22%3A%22img-src%22%2C%0A%22original-policy%22%3A%22default-src+%27self%27+https%3A%2F%2Fsomeurl.com%3B+script-src+%27self%27+%27unsafe-inline%27+https%3A%2F%2Fuse.typekit.com++https%3A%2F%2Fgoogle-analytics.com+https%3A%2F%2Fajax.googleapis.com+https%3A%2F%2Fjs.hsforms.net+https%3A%2F%2Fssl.google-analytics.com%3B+img-src+%27self%27+https%3A%2F%2Fp.typekit.net+https%3A%2F%2Fssl.google-analytics.com+%3B+font-src+https%3A%2F%2Fuse.typekit.com%3B+report-uri+%2Fcsp-violations-report-endpoint%2F%3B%22%2C%0A%22disposition%22%3A%22report%22%2C%0A%22blocked-uri%22%3A%22https%3A%2F%2Fsomeurl.com%2Fpath%2Fto%2Ffile%2F516.large.jpg%3F1530632190456%22%2C%0A%22status-code%22%3A200%2C%0A%22script-sample%22%3A%22%22%7D%7D%0A%7B%22csp-report%22%3A%7B%22document-uri%22%3A%22http%3A%2F%2Fathleticssite.com%2F%22%2C%0A%22referrer%22%3A%22%22%2C%0A%22violated-directive%22%3A%22img-src%22%2C%0A%22effective-directive%22%3A%22img-src%22%2C%0A%22original-policy%22%3A%22default-src+%27self%27+https%3A%2F%2Fsomeurl.com%3B+script-src+%27self%27+%27unsafe-inline%27+https%3A%2F%2Fuse.typekit.com++https%3A%2F%2Fgoogle-analytics.com+https%3A%2F%2Fajax.googleapis.com+https%3A%2F%2Fjs.hsforms.net+https%3A%2F%2Fssl.google-analytics.com%3B+img-src+%27self%27+https%3A%2F%2Fp.typekit.net+https%3A%2F%2Fssl.google-analytics.com+%3B+font-src+https%3A%2F%2Fuse.typekit.com%3B+report-uri+%2Fcsp-violations-report-endpoint%2F%3B%22%2C%0A%22disposition%22%3A%22report%22%2C%0A%22blocked-uri%22%3A%22https%3A%2F%2Fsomeurl.com%2Fpath%2Fto%2Ffile%2F516.large.jpg%3F1530632190456%22%2C%0A%22status-code%22%3A200%2C%0A%22script-sample%22%3A%22%22%7D%7D'
   24     1        ASSIGN                                                   !1, <array>
   26     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAL                                                 '%2F%22blocked-uri%22%3A%22%28.%2A%3F%29%22%2C%2Fm'
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !1
          6        DO_ICALL                                                 
   34     7      > FE_RESET_R                                       $7      !1, ->14
          8    > > FE_FETCH_R                                       ~8      $7, !2, ->14
          9    >   ASSIGN                                                   !3, ~8
   35    10        FETCH_DIM_R                                      ~10     !2, 1
         11        CONCAT                                           ~11     ~10, '%0A'
         12        ECHO                                                     ~11
   34    13      > JMP                                                      ->8
         14    >   FE_FREE                                                  $7
   36    15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.79 ms | 1396 KiB | 15 Q