3v4l.org

run code in 500+ PHP versions simultaneously
<?php $x = [ '01 song name.mp3 - 2.4 MB', '02 song name.mp3 - 4.0 MB', '03 song name.mp3 - 3.3 MB', '04 song name.mp3 - 3.5 MB', '05 song name.mp3 - 1.9 MB', '06 song name.mp3 - 3.4 MB', '07 song name.mp3 - 4.41 MB', '08 song name.mp3 - 13.9 MB', '09 song name.mp3 - 3.9 MB', '10 song name.mp3 - 3.6 MB', '11 song name.mp3 - 3.3 MB', ]; $regex = '#\s-\s\d*.\d*\sMB#'; foreach ($x as $y) { echo preg_replace($regex, '', $y)."\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 9
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 9
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/KsjrW
function name:  (null)
number of ops:  11
compiled vars:  !0 = $x, !1 = $regex, !2 = $y
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
   17     1        ASSIGN                                                       !1, '%23%5Cs-%5Cs%5Cd%2A.%5Cd%2A%5CsMB%23'
   19     2      > FE_RESET_R                                           $5      !0, ->9
          3    > > FE_FETCH_R                                                   $5, !2, ->9
   20     4    >   FRAMELESS_ICALL_3                preg_replace        ~6      !1, ''
          5        OP_DATA                                                      !2
          6        CONCAT                                               ~7      ~6, '%0A'
          7        ECHO                                                         ~7
   19     8      > JMP                                                          ->3
          9    >   FE_FREE                                                      $5
   21    10      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
170.64 ms | 2305 KiB | 13 Q