3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string_n = 'CODEsiema'; $prefix = 'CODE'; if (strncmp($string_n, $prefix, strlen($prefix)) === 0) { echo 'true'; } else { echo 'false'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/N9Jsl
function name:  (null)
number of ops:  14
compiled vars:  !0 = $string_n, !1 = $prefix
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'CODEsiema'
    4     1        ASSIGN                                                   !1, 'CODE'
    6     2        INIT_FCALL                                               'strncmp'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        STRLEN                                           ~4      !1
          6        SEND_VAL                                                 ~4
          7        DO_ICALL                                         $5      
          8        IS_IDENTICAL                                             $5, 0
          9      > JMPZ                                                     ~6, ->12
    7    10    >   ECHO                                                     'true'
         11      > JMP                                                      ->13
    9    12    >   ECHO                                                     'false'
   10    13    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
199.32 ms | 1399 KiB | 15 Q