3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $e = '\\a\\b\\c\\d'; $e = 'asfdhjadfhj'; var_dump(strrchr($e, '\\')); echo ltrim(strrpos($e, '\\') !== false ? strrchr($e, '\\') : $e);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 22
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AUJWg
function name:  (null)
number of ops:  27
compiled vars:  !0 = $e
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   ASSIGN                                                   !0, '%5Ca%5Cb%5Cc%5Cd'
   4     1        ASSIGN                                                   !0, 'asfdhjadfhj'
   6     2        INIT_FCALL                                               'var_dump'
         3        INIT_FCALL                                               'strrchr'
         4        SEND_VAR                                                 !0
         5        SEND_VAL                                                 '%5C'
         6        DO_ICALL                                         $3      
         7        SEND_VAR                                                 $3
         8        DO_ICALL                                                 
   8     9        INIT_FCALL                                               'ltrim'
        10        INIT_FCALL                                               'strrpos'
        11        SEND_VAR                                                 !0
        12        SEND_VAL                                                 '%5C'
        13        DO_ICALL                                         $5      
        14        IS_NOT_IDENTICAL                                 ~6      $5, <false>
        15      > JMPZ                                                     ~6, ->22
        16    >   INIT_FCALL                                               'strrchr'
        17        SEND_VAR                                                 !0
        18        SEND_VAL                                                 '%5C'
        19        DO_ICALL                                         $7      
        20        QM_ASSIGN                                        ~8      $7
        21      > JMP                                                      ->23
        22    >   QM_ASSIGN                                        ~8      !0
        23    >   SEND_VAL                                                 ~8
        24        DO_ICALL                                         $9      
        25        ECHO                                                     $9
        26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0