3v4l.org

run code in 300+ PHP versions simultaneously
<?php define('BR', "\n"); define('DS', DIRECTORY_SEPARATOR); $str = 'template/base/files/js\jquery1.11.min.js'; $str = str_replace(array('\\', '/'), DS, $str); echo $str . BR; $pos = strrpos($str, DS, 0); echo $pos;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RtHZI
function name:  (null)
number of ops:  28
compiled vars:  !0 = $str, !1 = $pos
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'BR'
          2        SEND_VAL                                                 '%0A'
          3        DO_ICALL                                                 
    3     4        INIT_FCALL                                               'define'
          5        SEND_VAL                                                 'DS'
          6        SEND_VAL                                                 '%2F'
          7        DO_ICALL                                                 
    4     8        ASSIGN                                                   !0, 'template%2Fbase%2Ffiles%2Fjs%5Cjquery1.11.min.js'
    5     9        INIT_FCALL                                               'str_replace'
         10        SEND_VAL                                                 <array>
         11        FETCH_CONSTANT                                   ~5      'DS'
         12        SEND_VAL                                                 ~5
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $6      
         15        ASSIGN                                                   !0, $6
    6    16        FETCH_CONSTANT                                   ~8      'BR'
         17        CONCAT                                           ~9      !0, ~8
         18        ECHO                                                     ~9
    7    19        INIT_FCALL                                               'strrpos'
         20        SEND_VAR                                                 !0
         21        FETCH_CONSTANT                                   ~10     'DS'
         22        SEND_VAL                                                 ~10
         23        SEND_VAL                                                 0
         24        DO_ICALL                                         $11     
         25        ASSIGN                                                   !1, $11
    8    26        ECHO                                                     !1
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.42 ms | 1387 KiB | 19 Q