3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dsn = 'git+http://github.com/phpDocumentor/phpDocumentor2;branch=develop'; $dsnParts = implode(';', $dsn); $location = $dsnParts[0]; unset($dsnParts[0]); $locationParts = parse_url($location); $options = array(); foreach($dsnParts as $part) { $option = explode('=', $part); $options[$option[0]] = $option[1]; } var_dump($locationParts); var_dump($options);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 26
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 26
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/Rj3Br
function name:  (null)
number of ops:  34
compiled vars:  !0 = $dsn, !1 = $dsnParts, !2 = $location, !3 = $locationParts, !4 = $options, !5 = $part, !6 = $option
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'git%2Bhttp%3A%2F%2Fgithub.com%2FphpDocumentor%2FphpDocumentor2%3Bbranch%3Ddevelop'
    4     1        INIT_FCALL                                               'implode'
          2        SEND_VAL                                                 '%3B'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $8      
          5        ASSIGN                                                   !1, $8
    5     6        FETCH_DIM_R                                      ~10     !1, 0
          7        ASSIGN                                                   !2, ~10
    6     8        UNSET_DIM                                                !1, 0
    7     9        INIT_FCALL                                               'parse_url'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                         $12     
         12        ASSIGN                                                   !3, $12
    8    13        ASSIGN                                                   !4, <array>
    9    14      > FE_RESET_R                                       $15     !1, ->26
         15    > > FE_FETCH_R                                               $15, !5, ->26
   10    16    >   INIT_FCALL                                               'explode'
         17        SEND_VAL                                                 '%3D'
         18        SEND_VAR                                                 !5
         19        DO_ICALL                                         $16     
         20        ASSIGN                                                   !6, $16
   11    21        FETCH_DIM_R                                      ~18     !6, 0
         22        FETCH_DIM_R                                      ~20     !6, 1
         23        ASSIGN_DIM                                               !4, ~18
         24        OP_DATA                                                  ~20
    9    25      > JMP                                                      ->15
         26    >   FE_FREE                                                  $15
   14    27        INIT_FCALL                                               'var_dump'
         28        SEND_VAR                                                 !3
         29        DO_ICALL                                                 
   15    30        INIT_FCALL                                               'var_dump'
         31        SEND_VAR                                                 !4
         32        DO_ICALL                                                 
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.05 ms | 1401 KiB | 21 Q