3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.39 ms | 1394 KiB | 17 Q