3v4l.org

run code in 300+ PHP versions simultaneously
<?php $urlKey = 'ftrcvgbhnjk-2000-4628-20.html'; /** * Needed for backward compatibility reasons, ensure correct resolving of old product urls * Removes the category part of the url villa-3565-67.html => villa-3565.html and indexed the old url */ $oldUrlKey = null; if (preg_match('/^.*-[0-9]+(-[0-9]+)\.html$/', $urlKey, $matches)) { $oldUrlKey = substr_replace($urlKey, '', strrpos($urlKey, $matches[1]), strlen($matches[1])); $index[$oldUrlKey] = $data; } var_dump(oldUrlKey, $matches);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 24
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/4J062
function name:  (null)
number of ops:  30
compiled vars:  !0 = $urlKey, !1 = $oldUrlKey, !2 = $matches, !3 = $index, !4 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'ftrcvgbhnjk-2000-4628-20.html'
    9     1        ASSIGN                                                   !1, null
   10     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAL                                                 '%2F%5E.%2A-%5B0-9%5D%2B%28-%5B0-9%5D%2B%29%5C.html%24%2F'
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !2
          6        DO_ICALL                                         $7      
          7      > JMPZ                                                     $7, ->24
   11     8    >   INIT_FCALL                                               'substr_replace'
          9        SEND_VAR                                                 !0
         10        SEND_VAL                                                 ''
         11        INIT_FCALL                                               'strrpos'
         12        SEND_VAR                                                 !0
         13        FETCH_DIM_R                                      ~8      !2, 1
         14        SEND_VAL                                                 ~8
         15        DO_ICALL                                         $9      
         16        SEND_VAR                                                 $9
         17        FETCH_DIM_R                                      ~10     !2, 1
         18        STRLEN                                           ~11     ~10
         19        SEND_VAL                                                 ~11
         20        DO_ICALL                                         $12     
         21        ASSIGN                                                   !1, $12
   12    22        ASSIGN_DIM                                               !3, !1
         23        OP_DATA                                                  !4
   15    24    >   INIT_FCALL                                               'var_dump'
         25        FETCH_CONSTANT                                   ~15     'oldUrlKey'
         26        SEND_VAL                                                 ~15
         27        SEND_VAR                                                 !2
         28        DO_ICALL                                                 
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.71 ms | 1396 KiB | 21 Q