3v4l.org

run code in 300+ PHP versions simultaneously
<?php $val="8M"; echo "9".return_bytes("8M"); function return_bytes(){ $val = trim($val); $last =str_split($val); echo $last[1]; } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5F5fT
function name:  (null)
number of ops:  7
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '8M'
    3     1        INIT_FCALL_BY_NAME                                       'return_bytes'
          2        SEND_VAL_EX                                              '8M'
          3        DO_FCALL                                      0  $2      
          4        CONCAT                                           ~3      '9', $2
          5        ECHO                                                     ~3
   13     6      > RETURN                                                   1

Function return_bytes:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5F5fT
function name:  return_bytes
number of ops:  11
compiled vars:  !0 = $val, !1 = $last
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'trim'
          1        SEND_VAR                                                 !0
          2        DO_ICALL                                         $2      
          3        ASSIGN                                                   !0, $2
    6     4        INIT_FCALL                                               'str_split'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        ASSIGN                                                   !1, $4
    8     8        FETCH_DIM_R                                      ~6      !1, 1
          9        ECHO                                                     ~6
   10    10      > RETURN                                                   null

End of function return_bytes

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.41 ms | 1395 KiB | 17 Q