3v4l.org

run code in 500+ PHP versions simultaneously
<?php $strs = explode("\n", '21 14" 14" 14 16"'); foreach ($strs as $str) { echo preg_replace('/(?<=\d)$/', '"', $str) . "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 12
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/fdUng
function name:  (null)
number of ops:  14
compiled vars:  !0 = $strs, !1 = $str
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'explode'
          1        SEND_VAL                                                     '%0A'
          2        SEND_VAL                                                     '21%0A14%22%0A14%22%0A14%0A%0A16%22'
          3        DO_ICALL                                             $2      
          4        ASSIGN                                                       !0, $2
    9     5      > FE_RESET_R                                           $4      !0, ->12
          6    > > FE_FETCH_R                                                   $4, !1, ->12
   10     7    >   FRAMELESS_ICALL_3                preg_replace        ~5      '%2F%28%3F%3C%3D%5Cd%29%24%2F', '%22'
          8        OP_DATA                                                      !1
          9        CONCAT                                               ~6      ~5, '%0A'
         10        ECHO                                                         ~6
    9    11      > JMP                                                          ->6
         12    >   FE_FREE                                                      $4
   11    13      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
224.39 ms | 1769 KiB | 14 Q