3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = "abcdefgh"; echo substr($input,0,1) . str_pad("",strlen($input) -2, "*") . substr($input,-1);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/F1U9k
function name:  (null)
number of ops:  21
compiled vars:  !0 = $input
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'abcdefgh'
    4     1        INIT_FCALL                                               'substr'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 1
          5        DO_ICALL                                         $2      
          6        INIT_FCALL                                               'str_pad'
          7        SEND_VAL                                                 ''
          8        STRLEN                                           ~3      !0
          9        SUB                                              ~4      ~3, 2
         10        SEND_VAL                                                 ~4
         11        SEND_VAL                                                 '%2A'
         12        DO_ICALL                                         $5      
         13        CONCAT                                           ~6      $2, $5
         14        INIT_FCALL                                               'substr'
         15        SEND_VAR                                                 !0
         16        SEND_VAL                                                 -1
         17        DO_ICALL                                         $7      
         18        CONCAT                                           ~8      ~6, $7
         19        ECHO                                                     ~8
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.19 ms | 1395 KiB | 17 Q