3v4l.org

run code in 300+ PHP versions simultaneously
<?php $reg_exUrl_youtube = '~(?:https?://)?(?:www\.)?(?:youtu\.be/|youtube\.com/(?:(?:watch)?\?(?:.*&)?vi?=|(?:embed|vi?|user)/))([^?&"\'>\s]+)(?![^<]*>)\S*~'; $message = 'text text text https://www.youtube.com/watch?v=9_pIaI93YGY text text text https://www.youtube.com/watch?v=1PUT2a5NafI&list=RD1PUT2a5NafI&start_radio=1 more text more text'; $message = preg_replace_callback($reg_exUrl_youtube, function($matches) { return "<div class=\"videoss videoss{$matches[1]}\"><a href=\"#\" class=\"videoshow\" id=\"{$matches[1]}\"><div style=\"background:url(/i/play.png) center no-repeat,url([zzzzz]img.youtube.com/vi/{$matches[1]}/mqdefault.jpg) center no-repeat;background-size:30%,cover;\" class=\"pd39 mroim60\"></div></a></div>"; }, $message); echo $message;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/l5Z3c
function name:  (null)
number of ops:  11
compiled vars:  !0 = $reg_exUrl_youtube, !1 = $message
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7E%28%3F%3Ahttps%3F%3A%2F%2F%29%3F%28%3F%3Awww%5C.%29%3F%28%3F%3Ayoutu%5C.be%2F%7Cyoutube%5C.com%2F%28%3F%3A%28%3F%3Awatch%29%3F%5C%3F%28%3F%3A.%2A%26%29%3Fvi%3F%3D%7C%28%3F%3Aembed%7Cvi%3F%7Cuser%29%2F%29%29%28%5B%5E%3F%26%22%27%3E%5Cs%5D%2B%29%28%3F%21%5B%5E%3C%5D%2A%3E%29%5CS%2A%7E'
    4     1        ASSIGN                                                   !1, 'text+text+text+https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D9_pIaI93YGY+text+text+text+https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D1PUT2a5NafI%26list%3DRD1PUT2a5NafI%26start_radio%3D1+more+text+more+text'
    6     2        INIT_FCALL                                               'preg_replace_callback'
          3        SEND_VAR                                                 !0
          4        DECLARE_LAMBDA_FUNCTION                          ~4      [0]
    8     5        SEND_VAL                                                 ~4
          6        SEND_VAR                                                 !1
    6     7        DO_ICALL                                         $5      
          8        ASSIGN                                                   !1, $5
   10     9        ECHO                                                     !1
   11    10      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/l5Z3c
function name:  {closure}
number of ops:  13
compiled vars:  !0 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        ROPE_INIT                                     7  ~5      '%3Cdiv+class%3D%22videoss+videoss'
          2        FETCH_DIM_R                                      ~1      !0, 1
          3        ROPE_ADD                                      1  ~5      ~5, ~1
          4        ROPE_ADD                                      2  ~5      ~5, '%22%3E%3Ca+href%3D%22%23%22+class%3D%22videoshow%22+id%3D%22'
          5        FETCH_DIM_R                                      ~2      !0, 1
          6        ROPE_ADD                                      3  ~5      ~5, ~2
          7        ROPE_ADD                                      4  ~5      ~5, '%22%3E%3Cdiv+style%3D%22background%3Aurl%28%2Fi%2Fplay.png%29+center+no-repeat%2Curl%28%5Bzzzzz%5Dimg.youtube.com%2Fvi%2F'
          8        FETCH_DIM_R                                      ~3      !0, 1
          9        ROPE_ADD                                      5  ~5      ~5, ~3
         10        ROPE_END                                      6  ~4      ~5, '%2Fmqdefault.jpg%29+center+no-repeat%3Bbackground-size%3A30%25%2Ccover%3B%22+class%3D%22pd39+mroim60%22%3E%3C%2Fdiv%3E%3C%2Fa%3E%3C%2Fdiv%3E'
         11      > RETURN                                                   ~4
    8    12*     > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.21 ms | 999 KiB | 14 Q