3v4l.org

run code in 300+ PHP versions simultaneously
<?php preg_match('#/\K[a-zA-Z0-9_-]+\.html$#', 'https://example.com.ua/part1/part2/part3/product-123.html', $match); echo $match[0];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4o9RM
function name:  (null)
number of ops:  8
compiled vars:  !0 = $match
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'preg_match'
          1        SEND_VAL                                                 '%23%2F%5CK%5Ba-zA-Z0-9_-%5D%2B%5C.html%24%23'
          2        SEND_VAL                                                 'https%3A%2F%2Fexample.com.ua%2Fpart1%2Fpart2%2Fpart3%2Fproduct-123.html'
          3        SEND_REF                                                 !0
          4        DO_ICALL                                                 
    3     5        FETCH_DIM_R                                      ~2      !0, 0
          6        ECHO                                                     ~2
          7      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
219 ms | 1000 KiB | 14 Q