3v4l.org

run code in 300+ PHP versions simultaneously
<?php $prefix = '+91'; $str = '+912345678765'; if (substr($str, 0, strlen($prefix)) == $prefix) { echo $str = substr($str, strlen($prefix)); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 17
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/pSFIm
function name:  (null)
number of ops:  18
compiled vars:  !0 = $prefix, !1 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%2B91'
    4     1        ASSIGN                                                   !1, '%2B912345678765'
    6     2        INIT_FCALL                                               'substr'
          3        SEND_VAR                                                 !1
          4        SEND_VAL                                                 0
          5        STRLEN                                           ~4      !0
          6        SEND_VAL                                                 ~4
          7        DO_ICALL                                         $5      
          8        IS_EQUAL                                                 !0, $5
          9      > JMPZ                                                     ~6, ->17
    7    10    >   INIT_FCALL                                               'substr'
         11        SEND_VAR                                                 !1
         12        STRLEN                                           ~7      !0
         13        SEND_VAL                                                 ~7
         14        DO_ICALL                                         $8      
         15        ASSIGN                                           ~9      !1, $8
         16        ECHO                                                     ~9
    8    17    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.71 ms | 1009 KiB | 14 Q