3v4l.org

run code in 300+ PHP versions simultaneously
<?php function asterisk($password) { $count = min(strlen($password), 4); $passwordAsterisk = str_repeat('*', $count) . substr($password, $count); echo $password . ' => ' . $passwordAsterisk . PHP_EOL; return $passwordAsterisk; } asterisk('abcdef'); asterisk('abc'); asterisk('');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KBrF9
function name:  (null)
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'asterisk'
          1        SEND_VAL                                                 'abcdef'
          2        DO_FCALL                                      0          
   14     3        INIT_FCALL                                               'asterisk'
          4        SEND_VAL                                                 'abc'
          5        DO_FCALL                                      0          
   15     6        INIT_FCALL                                               'asterisk'
          7        SEND_VAL                                                 ''
          8        DO_FCALL                                      0          
          9      > RETURN                                                   1

Function asterisk:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/KBrF9
function name:  asterisk
number of ops:  23
compiled vars:  !0 = $password, !1 = $count, !2 = $passwordAsterisk
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'min'
          2        STRLEN                                           ~3      !0
          3        SEND_VAL                                                 ~3
          4        SEND_VAL                                                 4
          5        DO_ICALL                                         $4      
          6        ASSIGN                                                   !1, $4
    6     7        INIT_FCALL                                               'str_repeat'
          8        SEND_VAL                                                 '%2A'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $6      
         11        INIT_FCALL                                               'substr'
         12        SEND_VAR                                                 !0
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $7      
         15        CONCAT                                           ~8      $6, $7
         16        ASSIGN                                                   !2, ~8
    8    17        CONCAT                                           ~10     !0, '+%3D%3E+'
         18        CONCAT                                           ~11     ~10, !2
         19        CONCAT                                           ~12     ~11, '%0A'
         20        ECHO                                                     ~12
   10    21      > RETURN                                                   !2
   11    22*     > RETURN                                                   null

End of function asterisk

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.65 ms | 1403 KiB | 22 Q