3v4l.org

run code in 300+ PHP versions simultaneously
<?php function parse_yturl($url) { $tmp = explode('?v=', $url); var_dump($tmp); if ($tmp[0] == $url) { $tmp = explode('&v=', $url); var_dump($tmp); } #$tmp[0] == $url && ($tmp = explode('&v=', $url, 1)); if ($tmp[0] == $url) { var_dump($tmp); } #explode('&', $tmp[1], 1)[0] var_dump($tmp); } parse_yturl("https://m.youtube.com/watch?v=p-e2G_VcTms&feature=g-logo&context=G29aead6FOAAAAAAABAA");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kd57t
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   INIT_FCALL                                               'parse_yturl'
          1        SEND_VAL                                                 'https%3A%2F%2Fm.youtube.com%2Fwatch%3Fv%3Dp-e2G_VcTms%26feature%3Dg-logo%26context%3DG29aead6FOAAAAAAABAA'
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Function parse_yturl:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 20
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 26
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
Branch analysis from position: 20
filename:       /in/kd57t
function name:  parse_yturl
number of ops:  30
compiled vars:  !0 = $url, !1 = $tmp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%3Fv%3D'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $2      
          5        ASSIGN                                                   !1, $2
    6     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
    8     9        FETCH_DIM_R                                      ~5      !1, 0
         10        IS_EQUAL                                                 !0, ~5
         11      > JMPZ                                                     ~6, ->20
    9    12    >   INIT_FCALL                                               'explode'
         13        SEND_VAL                                                 '%26v%3D'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                         $7      
         16        ASSIGN                                                   !1, $7
   10    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                                 
   16    20    >   FETCH_DIM_R                                      ~10     !1, 0
         21        IS_EQUAL                                                 !0, ~10
         22      > JMPZ                                                     ~11, ->26
   17    23    >   INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !1
         25        DO_ICALL                                                 
   21    26    >   INIT_FCALL                                               'var_dump'
         27        SEND_VAR                                                 !1
         28        DO_ICALL                                                 
   22    29      > RETURN                                                   null

End of function parse_yturl

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.33 ms | 1399 KiB | 18 Q