3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = 'a b'; $c1 = substr($string, 1, 1); $c2 = mb_substr($string, 1, 1); $c3 = iconv_substr($string, 1, 1); var_dump($c1, $c2, $c3);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RQ8EM
function name:  (null)
number of ops:  22
compiled vars:  !0 = $string, !1 = $c1, !2 = $c2, !3 = $c3
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'a+b'
    4     1        FRAMELESS_ICALL_3                substr              ~5      !0, 1
          2        OP_DATA                                                      1
          3        ASSIGN                                                       !1, ~5
    5     4        INIT_FCALL                                                   'mb_substr'
          5        SEND_VAR                                                     !0
          6        SEND_VAL                                                     1
          7        SEND_VAL                                                     1
          8        DO_ICALL                                             $7      
          9        ASSIGN                                                       !2, $7
    6    10        INIT_FCALL_BY_NAME                                           'iconv_substr'
         11        SEND_VAR_EX                                                  !0
         12        SEND_VAL_EX                                                  1
         13        SEND_VAL_EX                                                  1
         14        DO_FCALL                                          0  $9      
         15        ASSIGN                                                       !3, $9
    8    16        INIT_FCALL                                                   'var_dump'
         17        SEND_VAR                                                     !1
         18        SEND_VAR                                                     !2
         19        SEND_VAR                                                     !3
         20        DO_ICALL                                                     
         21      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
158.76 ms | 2062 KiB | 15 Q