3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = '/purest/test/testing_route/abcd'; list($matches['prefix'], $matches['service'], $matches['route']) = explode('/', ltrim($url, '/'), 3); var_dump($matches);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bABhN
function name:  (null)
number of ops:  24
compiled vars:  !0 = $url, !1 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, '%2Fpurest%2Ftest%2Ftesting_route%2Fabcd'
    6     1        INIT_FCALL                                               'explode'
          2        SEND_VAL                                                 '%2F'
          3        INIT_FCALL                                               'ltrim'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 '%2F'
          6        DO_ICALL                                         $3      
          7        SEND_VAR                                                 $3
          8        SEND_VAL                                                 3
          9        DO_ICALL                                         $4      
         10        FETCH_LIST_R                                     $5      $4, 0
         11        ASSIGN_DIM                                               !1, 'prefix'
         12        OP_DATA                                                  $5
         13        FETCH_LIST_R                                     $7      $4, 1
         14        ASSIGN_DIM                                               !1, 'service'
         15        OP_DATA                                                  $7
         16        FETCH_LIST_R                                     $9      $4, 2
         17        ASSIGN_DIM                                               !1, 'route'
         18        OP_DATA                                                  $9
         19        FREE                                                     $4
    7    20        INIT_FCALL                                               'var_dump'
         21        SEND_VAR                                                 !1
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
190.33 ms | 1395 KiB | 19 Q