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' ); print '<table>'; $results = array(); foreach ($samples as $s) { print $s."\n".str_replace($targets, $replace, $s)."\n\n"; } print '</table>';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 17
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 17
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/p9f9o
function name:  (null)
number of ops:  20
compiled vars:  !0 = $targets, !1 = $replace, !2 = $samples, !3 = $results, !4 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, '_'
    7     2        ASSIGN                                                   !2, <array>
   12     3        ECHO                                                     '%3Ctable%3E'
   13     4        ASSIGN                                                   !3, <array>
   14     5      > FE_RESET_R                                       $9      !2, ->17
          6    > > FE_FETCH_R                                               $9, !4, ->17
   15     7    >   CONCAT                                           ~10     !4, '%0A'
          8        INIT_FCALL                                               'str_replace'
          9        SEND_VAR                                                 !0
         10        SEND_VAR                                                 !1
         11        SEND_VAR                                                 !4
         12        DO_ICALL                                         $11     
         13        CONCAT                                           ~12     ~10, $11
         14        CONCAT                                           ~13     ~12, '%0A%0A'
         15        ECHO                                                     ~13
   14    16      > JMP                                                      ->6
         17    >   FE_FREE                                                  $9
   17    18        ECHO                                                     '%3C%2Ftable%3E'
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.72 ms | 1395 KiB | 15 Q