3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = '2014-02-05_10_10_33_664766918_index.log'; echo strrpos($string, '.'); echo '<br>'; echo substr ($string, 0, strrpos($string, '.')); echo '<br>'; echo substr ($string, strrpos($string, '.'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RRphM
function name:  (null)
number of ops:  28
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '2014-02-05_10_10_33_664766918_index.log'
    4     1        INIT_FCALL                                               'strrpos'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '.'
          4        DO_ICALL                                         $2      
          5        ECHO                                                     $2
    5     6        ECHO                                                     '%3Cbr%3E'
    6     7        INIT_FCALL                                               'substr'
          8        SEND_VAR                                                 !0
          9        SEND_VAL                                                 0
         10        INIT_FCALL                                               'strrpos'
         11        SEND_VAR                                                 !0
         12        SEND_VAL                                                 '.'
         13        DO_ICALL                                         $3      
         14        SEND_VAR                                                 $3
         15        DO_ICALL                                         $4      
         16        ECHO                                                     $4
    7    17        ECHO                                                     '%3Cbr%3E'
    8    18        INIT_FCALL                                               'substr'
         19        SEND_VAR                                                 !0
         20        INIT_FCALL                                               'strrpos'
         21        SEND_VAR                                                 !0
         22        SEND_VAL                                                 '.'
         23        DO_ICALL                                         $5      
         24        SEND_VAR                                                 $5
         25        DO_ICALL                                         $6      
         26        ECHO                                                     $6
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.56 ms | 1395 KiB | 17 Q