3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'aa'; if(substr($str, 0, 3) == pack("CCC", 0xef, 0xbb, 0xbf)) { $str = substr($str, 3); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 19
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/OPfto
function name:  (null)
number of ops:  20
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                                                 239
          9        SEND_VAL                                                 187
         10        SEND_VAL                                                 191
         11        DO_ICALL                                         $3      
         12        IS_EQUAL                                                 $2, $3
         13      > JMPZ                                                     ~4, ->19
    6    14    >   INIT_FCALL                                               'substr'
         15        SEND_VAR                                                 !0
         16        SEND_VAL                                                 3
         17        DO_ICALL                                         $5      
         18        ASSIGN                                                   !0, $5
    7    19    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.46 ms | 1395 KiB | 17 Q