3v4l.org

run code in 300+ PHP versions simultaneously
<?php function explodeYoutubeId($newstext, $divopt){ $search_text = array( "'^(http[s]*://www.youtube.com/watch\?[.]*v='", ); $replace_text = array( "", ); $newtext = preg_replace($search_text,$replace_text,$newstext); $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/N8gQF
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/N8gQF
function name:  explodeYoutubeId
number of ops:  17
compiled vars:  !0 = $newstext, !1 = $divopt, !2 = $search_text, !3 = $replace_text, !4 = $newtext
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    3     2        ASSIGN                                                   !2, <array>
    6     3        ASSIGN                                                   !3, <array>
    9     4        INIT_FCALL                                               'preg_replace'
          5        SEND_VAR                                                 !2
          6        SEND_VAR                                                 !3
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $7      
          9        ASSIGN                                                   !4, $7
   10    10        CONCAT                                           ~9      '%3Cdiv+', !1
         11        CONCAT                                           ~10     ~9, '%3E%3Cp%3E'
         12        CONCAT                                           ~11     ~10, !4
         13        CONCAT                                           ~12     ~11, '%3C%2Fp%3E%3C%2Fdiv%3E'
         14        ASSIGN                                                   !4, ~12
   12    15      > RETURN                                                   !4
   13    16*     > RETURN                                                   null

End of function explodeyoutubeid

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.44 ms | 1389 KiB | 16 Q