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' ); $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 = 5, Position 2 = 16
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 16
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/PkX7B
function name:  (null)
number of ops:  18
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>
   13     3        ASSIGN                                                   !3, <array>
   14     4      > FE_RESET_R                                       $9      !2, ->16
          5    > > FE_FETCH_R                                               $9, !4, ->16
   15     6    >   CONCAT                                           ~10     !4, '%0A'
          7        INIT_FCALL                                               'str_replace'
          8        SEND_VAR                                                 !0
          9        SEND_VAR                                                 !1
         10        SEND_VAR                                                 !4
         11        DO_ICALL                                         $11     
         12        CONCAT                                           ~12     ~10, $11
         13        CONCAT                                           ~13     ~12, '%0A%0A'
         14        ECHO                                                     ~13
   14    15      > JMP                                                      ->5
         16    >   FE_FREE                                                  $9
   16    17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.75 ms | 1386 KiB | 15 Q