3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '~(?=(/\d+/))~m'; $str = 'https://somesite.com/0/posts/20/290/755653-Title.html'; preg_match_all($re, $str, $matches); print_r($matches[1]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bSet1
function name:  (null)
number of ops:  12
compiled vars:  !0 = $re, !1 = $str, !2 = $matches
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%7E%28%3F%3D%28%2F%5Cd%2B%2F%29%29%7Em'
    4     1        ASSIGN                                                   !1, 'https%3A%2F%2Fsomesite.com%2F0%2Fposts%2F20%2F290%2F755653-Title.html'
    6     2        INIT_FCALL                                               'preg_match_all'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        SEND_REF                                                 !2
          6        DO_ICALL                                                 
    7     7        INIT_FCALL                                               'print_r'
          8        FETCH_DIM_R                                      ~6      !2, 1
          9        SEND_VAL                                                 ~6
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.33 ms | 997 KiB | 15 Q