3v4l.org

run code in 300+ PHP versions simultaneously
<?php $targets = array('\\','/',':','*','?','"','<','>','|','-', ' '); $replace = '_'; $samples = array( 'c:\Windows\win.com', '/chat/stackoverflow/com/rooms/11.php', 'I like goats', ' ', 'OVER NINE THOUSAAAAAAAAAAAANNNNNDDDDDDDDDDDAAAH!!!!!!!!!!!!!!!!!!!!!!!!!!1111', false, null, new stdobj() ); $results = array(); foreach ($samples as $s) { print $s."\n".str_replace($targets, $replace, $s)."\n\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 26
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 26
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/f6rW0
function name:  (null)
number of ops:  28
compiled vars:  !0 = $targets, !1 = $replace, !2 = $samples, !3 = $results, !4 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, '_'
    7     2        INIT_ARRAY                                       ~7      'c%3A%5CWindows%5Cwin.com'
    8     3        ADD_ARRAY_ELEMENT                                ~7      '%2Fchat%2Fstackoverflow%2Fcom%2Frooms%2F11.php'
    9     4        ADD_ARRAY_ELEMENT                                ~7      'I+like+goats'
   10     5        ADD_ARRAY_ELEMENT                                ~7      '++++++++++++++'
   11     6        ADD_ARRAY_ELEMENT                                ~7      'OVER+NINE+THOUSAAAAAAAAAAAANNNNNDDDDDDDDDDDAAAH%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%21%211111'
    7     7        ADD_ARRAY_ELEMENT                                ~7      <false>
          8        ADD_ARRAY_ELEMENT                                ~7      null
   14     9        NEW                                              $8      'stdobj'
         10        DO_FCALL                                      0          
         11        ADD_ARRAY_ELEMENT                                ~7      $8
    6    12        ASSIGN                                                   !2, ~7
   17    13        ASSIGN                                                   !3, <array>
   18    14      > FE_RESET_R                                       $12     !2, ->26
         15    > > FE_FETCH_R                                               $12, !4, ->26
   19    16    >   CONCAT                                           ~13     !4, '%0A'
         17        INIT_FCALL                                               'str_replace'
         18        SEND_VAR                                                 !0
         19        SEND_VAR                                                 !1
         20        SEND_VAR                                                 !4
         21        DO_ICALL                                         $14     
         22        CONCAT                                           ~15     ~13, $14
         23        CONCAT                                           ~16     ~15, '%0A%0A'
         24        ECHO                                                     ~16
   18    25      > JMP                                                      ->15
         26    >   FE_FREE                                                  $12
   20    27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.61 ms | 1396 KiB | 15 Q