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); 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/7SElj
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     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
   15     4      > RETURN                                                   1

Function explodeyoutubeid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7SElj
function name:  explodeYoutubeId
number of ops:  11
compiled vars:  !0 = $link, !1 = $search_text, !2 = $replace_text, !3 = $newtext
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                                         $6      
          8        ASSIGN                                                   !3, $6
   11     9      > RETURN                                                   !3
   12    10*     > RETURN                                                   null

End of function explodeyoutubeid

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.72 ms | 1397 KiB | 16 Q