3v4l.org

run code in 300+ PHP versions simultaneously
<?php function explodeYoutubeId($link){ $search_text = array( "'^(http[s]*:\/\/www.youtube.com\/watch\?[.]*v='", ); $replace_text = array( "", ); $newtext = preg_replace($search_text,$replace_text,$link); $newtext = '<div '.$divopt.'><p>'.$newtext.'</p></div>'; return $newtext; } echo explodeYoutubeId('https://www.youtube.com/watch?feature=player_embedded&v=M7lc1UVf-VE#!'); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4nkRh
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'explodeyoutubeid'
          1        SEND_VAL                                                 'https%3A%2F%2Fwww.youtube.com%2Fwatch%3Ffeature%3Dplayer_embedded%26v%3DM7lc1UVf-VE%23%21'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
   16     4      > RETURN                                                   1

Function explodeyoutubeid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4nkRh
function name:  explodeYoutubeId
number of ops:  16
compiled vars:  !0 = $link, !1 = $search_text, !2 = $replace_text, !3 = $newtext, !4 = $divopt
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        ASSIGN                                                   !1, <array>
    6     2        ASSIGN                                                   !2, <array>
    9     3        INIT_FCALL                                               'preg_replace'
          4        SEND_VAR                                                 !1
          5        SEND_VAR                                                 !2
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !3, $7
   10     9        CONCAT                                           ~9      '%3Cdiv+', !4
         10        CONCAT                                           ~10     ~9, '%3E%3Cp%3E'
         11        CONCAT                                           ~11     ~10, !3
         12        CONCAT                                           ~12     ~11, '%3C%2Fp%3E%3C%2Fdiv%3E'
         13        ASSIGN                                                   !3, ~12
   12    14      > RETURN                                                   !3
   13    15*     > RETURN                                                   null

End of function explodeyoutubeid

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.32 ms | 1398 KiB | 16 Q