3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/\s-\s\d\.\d\sMB/'; // example match " - 4.0 MB" $str = '<a href="http://example.com/a0j8nm5l3wo0" target=_blank>01 song name.mp3 - 2.4 MB</a> <a href="http://example.com/ic1jfhhzzfth" target=_blank>02 song name.mp3 - 4.0 MB</a> <a href="http://example.com/zo2nv6bzy6gd" target=_blank>03 song_name.mp3 - 3.3 MB</a> <a href="http://example.com/5fyony1m4j0w" target=_blank>04 song name.mp3 - 3.5 MB</a> <a href="http://example.com/3imswet27clg" target=_blank>05 song name.mp3 - 1.9 MB</a> <a href="http://example.com/ml65j3gpdggv" target=_blank>06 song - name.mp3 - 3.4 MB</a> <a href="http://example.com/hmuk8il0a04j" target=_blank>07 song name.mp3 - 4.4 MB</a> <a href="http://example.com/qx81e67ystd3" target=_blank>08 song-name.mp3 - 3.9 MB</a> <a href="http://example.com/g6fo1s64vzkj" target=_blank>09 song name.mp3 - 3.9 MB</a> <a href="http://example.com/xo3hw4xyx372" target=_blank>10 song name.mp3 - 3.6 MB</a> <a href="http://example.com/ivcth22eqygd" target=_blank>11 song-name.mp3 - 3.3 MB</a>'; $subst = ''; $result = preg_replace($re, $subst, $str); echo $result;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1YEN9
function name:  (null)
number of ops:  11
compiled vars:  !0 = $re, !1 = $str, !2 = $subst, !3 = $result
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%2F%5Cs-%5Cs%5Cd%5C.%5Cd%5CsMB%2F'
    3     1        ASSIGN                                                   !1, '%3Ca+href%3D%22http%3A%2F%2Fexample.com%2Fa0j8nm5l3wo0%22+target%3D_blank%3E01+song+name.mp3+-+2.4+MB%3C%2Fa%3E%0A++++%3Ca+href%3D%22http%3A%2F%2Fexample.com%2Fic1jfhhzzfth%22+target%3D_blank%3E02+song+name.mp3+-+4.0+MB%3C%2Fa%3E%0A++++%3Ca+href%3D%22http%3A%2F%2Fexample.com%2Fzo2nv6bzy6gd%22+target%3D_blank%3E03+song_name.mp3+-+3.3+MB%3C%2Fa%3E%0A++++%3Ca+href%3D%22http%3A%2F%2Fexample.com%2F5fyony1m4j0w%22+target%3D_blank%3E04+song+name.mp3+-+3.5+MB%3C%2Fa%3E%0A++++%3Ca+href%3D%22http%3A%2F%2Fexample.com%2F3imswet27clg%22+target%3D_blank%3E05+song+name.mp3+-+1.9+MB%3C%2Fa%3E%0A++++%3Ca+href%3D%22http%3A%2F%2Fexample.com%2Fml65j3gpdggv%22+target%3D_blank%3E06+song+-+name.mp3+-+3.4+MB%3C%2Fa%3E%0A++++%3Ca+href%3D%22http%3A%2F%2Fexample.com%2Fhmuk8il0a04j%22+target%3D_blank%3E07+song+name.mp3+-+4.4+MB%3C%2Fa%3E%0A++++%3Ca+href%3D%22http%3A%2F%2Fexample.com%2Fqx81e67ystd3%22+target%3D_blank%3E08+song-name.mp3+-+3.9+MB%3C%2Fa%3E%0A++++%3Ca+href%3D%22http%3A%2F%2Fexample.com%2Fg6fo1s64vzkj%22+target%3D_blank%3E09+song+name.mp3+-+3.9+MB%3C%2Fa%3E%0A++++%3Ca+href%3D%22http%3A%2F%2Fexample.com%2Fxo3hw4xyx372%22+target%3D_blank%3E10+song+name.mp3+-+3.6+MB%3C%2Fa%3E%0A++++%3Ca+href%3D%22http%3A%2F%2Fexample.com%2Fivcth22eqygd%22+target%3D_blank%3E11+song-name.mp3+-+3.3+MB%3C%2Fa%3E'
   14     2        ASSIGN                                                   !2, ''
   16     3        INIT_FCALL                                               'preg_replace'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !2
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !3, $7
   18     9        ECHO                                                     !3
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.92 ms | 1002 KiB | 14 Q