3v4l.org

run code in 300+ PHP versions simultaneously
<!DOCTYPE html> <html> <head><title>some title</title></head> <body> <form method="post" action=""> <input type="text" name="something"/> <input type="submit" value="click" name="submit" /> </form> <?php if(isset($_POST['submit'])) { $text = $_POST ['something']; $replaced = preg_replace('#https://www\.youtube\.com/watch\?v=(\w+)[^\s]+#i','<iframe width="853" height="480" src="http://www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe>',$text); echo $replaced ; } ?> </body> <html>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 14
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/Bvega
function name:  (null)
number of ops:  16
compiled vars:  !0 = $text, !1 = $replaced
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   ECHO                                                     '%3C%21DOCTYPE+html%3E%0A%3Chtml%3E%0A%3Chead%3E%3Ctitle%3Esome+title%3C%2Ftitle%3E%3C%2Fhead%3E%0A%3Cbody%3E%0A++%3Cform+method%3D%22post%22+action%3D%22%22%3E%0A++++%3Cinput+type%3D%22text%22+name%3D%22something%22%2F%3E%0A++++%3Cinput+type%3D%22submit%22+value%3D%22click%22+name%3D%22submit%22+%2F%3E%0A++%3C%2Fform%3E%0A%0A'
   12     1        FETCH_IS                                         ~2      '_POST'
          2        ISSET_ISEMPTY_DIM_OBJ                         0          ~2, 'submit'
          3      > JMPZ                                                     ~3, ->14
   13     4    >   FETCH_R                      global              ~4      '_POST'
          5        FETCH_DIM_R                                      ~5      ~4, 'something'
          6        ASSIGN                                                   !0, ~5
   15     7        INIT_FCALL                                               'preg_replace'
          8        SEND_VAL                                                 '%23https%3A%2F%2Fwww%5C.youtube%5C.com%2Fwatch%5C%3Fv%3D%28%5Cw%2B%29%5B%5E%5Cs%5D%2B%23i'
          9        SEND_VAL                                                 '%3Ciframe+width%3D%22853%22+height%3D%22480%22+src%3D%22http%3A%2F%2Fwww.youtube.com%2Fembed%2F%241%22+frameborder%3D%220%22+allowfullscreen%3E%3C%2Fiframe%3E'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $7      
         12        ASSIGN                                                   !1, $7
   17    13        ECHO                                                     !1
   23    14    >   ECHO                                                     '%0A%3C%2Fbody%3E%0A%3Chtml%3E'
   25    15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.9 ms | 1395 KiB | 15 Q