3v4l.org

run code in 300+ PHP versions simultaneously
<?php $urlKey = 'ftrcvgbhnjk-2000-4628-20.html?hdfjdslkf=sdjfh'; if ($result = preg_match('/-\d+-(\d+)\.html.*$/', $urlKey, $matches)) { $result = $matches[1]; } echo $result; var_dump($matches); echo $oldUrlKey;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/TnJ4g
function name:  (null)
number of ops:  16
compiled vars:  !0 = $urlKey, !1 = $result, !2 = $matches, !3 = $oldUrlKey
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'ftrcvgbhnjk-2000-4628-20.html%3Fhdfjdslkf%3Dsdjfh'
    5     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%2F-%5Cd%2B-%28%5Cd%2B%29%5C.html.%2A%24%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !2
          5        DO_ICALL                                         $5      
          6        ASSIGN                                           ~6      !1, $5
          7      > JMPZ                                                     ~6, ->10
    6     8    >   FETCH_DIM_R                                      ~7      !2, 1
          9        ASSIGN                                                   !1, ~7
    9    10    >   ECHO                                                     !1
   11    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                                 
   12    14        ECHO                                                     !3
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.43 ms | 1386 KiB | 17 Q