3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.24 ms | 1395 KiB | 19 Q