3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "http://127.0.0.1:3333/item/id/3"; $path = parse_url($string, PHP_URL_PATH); $pattern = '/(\d+)$/'; preg_match($pattern, $path, $matches); $id = $matches[1]; //echo $path;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/JCDMH
function name:  (null)
number of ops:  15
compiled vars:  !0 = $string, !1 = $path, !2 = $pattern, !3 = $matches, !4 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2F127.0.0.1%3A3333%2Fitem%2Fid%2F3'
    4     1        INIT_FCALL                                               'parse_url'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 5
          4        DO_ICALL                                         $6      
          5        ASSIGN                                                   !1, $6
    7     6        ASSIGN                                                   !2, '%2F%28%5Cd%2B%29%24%2F'
    8     7        INIT_FCALL                                               'preg_match'
          8        SEND_VAR                                                 !2
          9        SEND_VAR                                                 !1
         10        SEND_REF                                                 !3
         11        DO_ICALL                                                 
    9    12        FETCH_DIM_R                                      ~10     !3, 1
         13        ASSIGN                                                   !4, ~10
   11    14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.89 ms | 1394 KiB | 17 Q