3v4l.org

run code in 500+ PHP versions simultaneously
<?php $a = 'cde'; if ( strpos($a, 'abc') === 0) { /**/ } // Replace with if ( str_starts_with($a, 'abc')) { /**/ } if ( strpos($a, 'abc') !== 0) { /**/ } // Replace with if ( !str_starts_with($a, 'abc')) { /**/ } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 4
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 6
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 9
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
Branch analysis from position: 9
Branch analysis from position: 6
Branch analysis from position: 4
filename:       /in/bO6YB
function name:  (null)
number of ops:  13
compiled vars:  !0 = $a
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'cde'
    5     1        FRAMELESS_ICALL_2                strpos              ~2      !0, 'abc'
          2        IS_IDENTICAL                                                 ~2, 0
          3      > JMPZ                                                         ~3, ->4
    7     4    >   FRAMELESS_ICALL_2                str_starts_with      ~4      !0, 'abc'
          5      > JMPZ                                                         ~4, ->6
    9     6    >   FRAMELESS_ICALL_2                strpos              ~5      !0, 'abc'
          7        IS_NOT_IDENTICAL                                             ~5, 0
          8      > JMPZ                                                         ~6, ->9
   11     9    >   FRAMELESS_ICALL_2                str_starts_with      ~7      !0, 'abc'
         10        BOOL_NOT                                             ~8      ~7
         11      > JMPZ                                                         ~8, ->12
   13    12    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
169.47 ms | 3364 KiB | 13 Q