3v4l.org

run code in 300+ PHP versions simultaneously
<?php foreach (array( 'path_without_slash', 'path/to/file/', 'path/to/file', ) as $somestring) { var_dump(substr($somestring, strrpos("/$somestring", '/'))); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 1, Position 2 = 16
Branch analysis from position: 1
2 jumps found. (Code = 78) Position 1 = 2, Position 2 = 16
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 1
Branch analysis from position: 1
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/utXvS
function name:  (null)
number of ops:  18
compiled vars:  !0 = $somestring
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E > > FE_RESET_R                                       $1      <array>, ->16
          1    > > FE_FETCH_R                                               $1, !0, ->16
    8     2    >   INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'substr'
          4        SEND_VAR                                                 !0
          5        INIT_FCALL                                               'strrpos'
          6        NOP                                                      
          7        FAST_CONCAT                                      ~2      '%2F', !0
          8        SEND_VAL                                                 ~2
          9        SEND_VAL                                                 '%2F'
         10        DO_ICALL                                         $3      
         11        SEND_VAR                                                 $3
         12        DO_ICALL                                         $4      
         13        SEND_VAR                                                 $4
         14        DO_ICALL                                                 
    4    15      > JMP                                                      ->1
         16    >   FE_FREE                                                  $1
    9    17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
192.52 ms | 1001 KiB | 16 Q