3v4l.org

run code in 300+ PHP versions simultaneously
<?php function NukesSpam($input) { $blacklist = array('domain.com','visual.merriam-webster.com','example.com'); $output=$input; foreach ($blacklist as $a_blacklisted) { $output = preg_replace('/<img(.*?)src=.http(.*?)'.str_replace('.','\.',$a_blacklisted).'(.*?)>/', '<img src="http://standardsurvival.com/faces/64/drusz.png">', $output); } return $output; } echo NukesSpam('<img src="http://www.domain.com/test1.jpg">');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ufbG7
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               'nukesspam'
          1        SEND_VAL                                                 '%3Cimg+src%3D%22http%3A%2F%2Fwww.domain.com%2Ftest1.jpg%22%3E'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function nukesspam:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 19
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 19
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/ufbG7
function name:  NukesSpam
number of ops:  22
compiled vars:  !0 = $input, !1 = $blacklist, !2 = $output, !3 = $a_blacklisted
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        ASSIGN                                                   !1, <array>
    7     2        ASSIGN                                                   !2, !0
    9     3      > FE_RESET_R                                       $6      !1, ->19
          4    > > FE_FETCH_R                                               $6, !3, ->19
   11     5    >   INIT_FCALL                                               'preg_replace'
          6        INIT_FCALL                                               'str_replace'
          7        SEND_VAL                                                 '.'
          8        SEND_VAL                                                 '%5C.'
          9        SEND_VAR                                                 !3
         10        DO_ICALL                                         $7      
         11        CONCAT                                           ~8      '%2F%3Cimg%28.%2A%3F%29src%3D.http%28.%2A%3F%29', $7
         12        CONCAT                                           ~9      ~8, '%28.%2A%3F%29%3E%2F'
         13        SEND_VAL                                                 ~9
         14        SEND_VAL                                                 '%3Cimg+src%3D%22http%3A%2F%2Fstandardsurvival.com%2Ffaces%2F64%2Fdrusz.png%22%3E'
         15        SEND_VAR                                                 !2
         16        DO_ICALL                                         $10     
         17        ASSIGN                                                   !2, $10
    9    18      > JMP                                                      ->4
         19    >   FE_FREE                                                  $6
   14    20      > RETURN                                                   !2
   15    21*     > RETURN                                                   null

End of function nukesspam

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.82 ms | 1399 KiB | 18 Q