3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'Site'; echo preg_replace('#.*\\\\([^\\\\]+)$#', '$1', $string) . "\n"; $string = '\Site'; echo preg_replace('#.*\\\\([^\\\\]+)$#', '$1', $string) . "\n"; $string = 'My\Special\Site'; echo preg_replace('#.*\\\\([^\\\\]+)$#', '$1', $string) . "\n"; $string = '\My\Special\Site'; echo preg_replace('#.*\\\\([^\\\\]+)$#', '$1', $string) . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0iF0P
function name:  (null)
number of ops:  33
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'Site'
    3     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%23.%2A%5C%5C%28%5B%5E%5C%5C%5D%2B%29%24%23'
          3        SEND_VAL                                                 '%241'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        CONCAT                                           ~3      $2, '%0A'
          7        ECHO                                                     ~3
    5     8        ASSIGN                                                   !0, '%5CSite'
    6     9        INIT_FCALL                                               'preg_replace'
         10        SEND_VAL                                                 '%23.%2A%5C%5C%28%5B%5E%5C%5C%5D%2B%29%24%23'
         11        SEND_VAL                                                 '%241'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $5      
         14        CONCAT                                           ~6      $5, '%0A'
         15        ECHO                                                     ~6
    8    16        ASSIGN                                                   !0, 'My%5CSpecial%5CSite'
    9    17        INIT_FCALL                                               'preg_replace'
         18        SEND_VAL                                                 '%23.%2A%5C%5C%28%5B%5E%5C%5C%5D%2B%29%24%23'
         19        SEND_VAL                                                 '%241'
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                         $8      
         22        CONCAT                                           ~9      $8, '%0A'
         23        ECHO                                                     ~9
   11    24        ASSIGN                                                   !0, '%5CMy%5CSpecial%5CSite'
   12    25        INIT_FCALL                                               'preg_replace'
         26        SEND_VAL                                                 '%23.%2A%5C%5C%28%5B%5E%5C%5C%5D%2B%29%24%23'
         27        SEND_VAL                                                 '%241'
         28        SEND_VAR                                                 !0
         29        DO_ICALL                                         $11     
         30        CONCAT                                           ~12     $11, '%0A'
         31        ECHO                                                     ~12
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.24 ms | 1396 KiB | 15 Q