3v4l.org

run code in 300+ 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:  25
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        INIT_FCALL                                               'substr'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 1
          4        SEND_VAL                                                 1
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !1, $5
    5     7        INIT_FCALL                                               'mb_substr'
          8        SEND_VAR                                                 !0
          9        SEND_VAL                                                 1
         10        SEND_VAL                                                 1
         11        DO_ICALL                                         $7      
         12        ASSIGN                                                   !2, $7
    6    13        INIT_FCALL_BY_NAME                                       'iconv_substr'
         14        SEND_VAR_EX                                              !0
         15        SEND_VAL_EX                                              1
         16        SEND_VAL_EX                                              1
         17        DO_FCALL                                      0  $9      
         18        ASSIGN                                                   !3, $9
    8    19        INIT_FCALL                                               'var_dump'
         20        SEND_VAR                                                 !1
         21        SEND_VAR                                                 !2
         22        SEND_VAR                                                 !3
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.16 ms | 1399 KiB | 19 Q