3v4l.org

run code in 300+ PHP versions simultaneously
<?php function parse_yturl($url) { $tmp = explode('?v=', $url); $tmp[0] == $url && ($tmp = explode('&v=', $url)); if ($tmp[0] == $url) { var_dump('false'); return false; } if ($tmp[0] == $url) { $tmp = explode('&v=', $url); var_dump($tmp); } #$tmp[0] == $url && ($tmp = explode('&v=', $url, 1)); #explode('&', $tmp[1], 1)[0] var_dump(explode('&', $tmp[1], 1)[0]); } 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/QVUZb
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     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 = 46) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 22
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 33
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
Branch analysis from position: 15
filename:       /in/QVUZb
function name:  parse_yturl
number of ops:  44
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        FETCH_DIM_R                                      ~4      !1, 0
          7        IS_EQUAL                                         ~5      !0, ~4
          8      > JMPZ_EX                                          ~5      ~5, ->15
          9    >   INIT_FCALL                                               'explode'
         10        SEND_VAL                                                 '%26v%3D'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $6      
         13        ASSIGN                                           ~7      !1, $6
         14        BOOL                                             ~5      ~7
    8    15    >   FETCH_DIM_R                                      ~8      !1, 0
         16        IS_EQUAL                                                 !0, ~8
         17      > JMPZ                                                     ~9, ->22
    9    18    >   INIT_FCALL                                               'var_dump'
         19        SEND_VAL                                                 'false'
         20        DO_ICALL                                                 
   10    21      > RETURN                                                   <false>
   13    22    >   FETCH_DIM_R                                      ~11     !1, 0
         23        IS_EQUAL                                                 !0, ~11
         24      > JMPZ                                                     ~12, ->33
   14    25    >   INIT_FCALL                                               'explode'
         26        SEND_VAL                                                 '%26v%3D'
         27        SEND_VAR                                                 !0
         28        DO_ICALL                                         $13     
         29        ASSIGN                                                   !1, $13
   15    30        INIT_FCALL                                               'var_dump'
         31        SEND_VAR                                                 !1
         32        DO_ICALL                                                 
   24    33    >   INIT_FCALL                                               'var_dump'
         34        INIT_FCALL                                               'explode'
         35        SEND_VAL                                                 '%26'
         36        FETCH_DIM_R                                      ~16     !1, 1
         37        SEND_VAL                                                 ~16
         38        SEND_VAL                                                 1
         39        DO_ICALL                                         $17     
         40        FETCH_DIM_R                                      ~18     $17, 0
         41        SEND_VAL                                                 ~18
         42        DO_ICALL                                                 
   25    43      > RETURN                                                   null

End of function parse_yturl

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.21 ms | 1403 KiB | 18 Q