3v4l.org

run code in 300+ PHP versions simultaneously
<?php $code = '**x'; $index = stripos($code,'*'); echo $index+"\n"; $code = str_replace('*','',$code); echo $code+"\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HW4JQ
function name:  (null)
number of ops:  17
compiled vars:  !0 = $code, !1 = $index
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%2A%2Ax'
    3     1        INIT_FCALL                                               'stripos'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '%2A'
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
    4     6        ADD                                              ~5      !1, '%0A'
          7        ECHO                                                     ~5
    5     8        INIT_FCALL                                               'str_replace'
          9        SEND_VAL                                                 '%2A'
         10        SEND_VAL                                                 ''
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $6      
         13        ASSIGN                                                   !0, $6
    6    14        ADD                                              ~8      !0, '%0A'
         15        ECHO                                                     ~8
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.29 ms | 1386 KiB | 17 Q