3v4l.org

run code in 300+ PHP versions simultaneously
<?php // hex e2 99 a5; // dec 226 153 165 $str = "♥"; // 3 byte values per above var_dump( ord(mb_strcut($str, 0, 1) )); var_dump( ord(mb_strcut($str, 1, 1) )); var_dump( ord(mb_strcut($str, 2, 1) ));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OoFus
function name:  (null)
number of ops:  35
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, '%E2%99%A5'
    7     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'ord'
          3        INIT_FCALL                                               'mb_strcut'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 0
          6        SEND_VAL                                                 1
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
          9        DO_ICALL                                         $3      
         10        SEND_VAR                                                 $3
         11        DO_ICALL                                                 
    8    12        INIT_FCALL                                               'var_dump'
         13        INIT_FCALL                                               'ord'
         14        INIT_FCALL                                               'mb_strcut'
         15        SEND_VAR                                                 !0
         16        SEND_VAL                                                 1
         17        SEND_VAL                                                 1
         18        DO_ICALL                                         $5      
         19        SEND_VAR                                                 $5
         20        DO_ICALL                                         $6      
         21        SEND_VAR                                                 $6
         22        DO_ICALL                                                 
    9    23        INIT_FCALL                                               'var_dump'
         24        INIT_FCALL                                               'ord'
         25        INIT_FCALL                                               'mb_strcut'
         26        SEND_VAR                                                 !0
         27        SEND_VAL                                                 2
         28        SEND_VAL                                                 1
         29        DO_ICALL                                         $8      
         30        SEND_VAR                                                 $8
         31        DO_ICALL                                         $9      
         32        SEND_VAR                                                 $9
         33        DO_ICALL                                                 
         34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.77 ms | 1001 KiB | 16 Q