3v4l.org

run code in 300+ PHP versions simultaneously
<?php $e = '\\a\\b\\c\\d'; var_dump(strrchr($e, '\\')); echo ltrim(substr($e, strrchr($e, '\\') || 0), '\\');
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 16, Position 2 = 17
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/upGVa
function name:  (null)
number of ops:  24
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%5Ca%5Cb%5Cc%5Cd'
    5     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'strrchr'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 '%5C'
          5        DO_ICALL                                         $2      
          6        SEND_VAR                                                 $2
          7        DO_ICALL                                                 
    7     8        INIT_FCALL                                               'ltrim'
          9        INIT_FCALL                                               'substr'
         10        SEND_VAR                                                 !0
         11        INIT_FCALL                                               'strrchr'
         12        SEND_VAR                                                 !0
         13        SEND_VAL                                                 '%5C'
         14        DO_ICALL                                         $4      
         15      > JMPNZ_EX                                         ~5      $4, ->17
         16    >   BOOL                                             ~5      0
         17    >   SEND_VAL                                                 ~5
         18        DO_ICALL                                         $6      
         19        SEND_VAR                                                 $6
         20        SEND_VAL                                                 '%5C'
         21        DO_ICALL                                         $7      
         22        ECHO                                                     $7
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.66 ms | 1386 KiB | 21 Q