3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "AULIA"; $word =""; Foreach(array_slice(explode(" ", $str),0,3) as $c) $word .= $c[0]; If(strlen($word) < 3) $word .= Substr($c,1,3-strlen($word)); Echo $word;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 16
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 28
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
Branch analysis from position: 16
filename:       /in/mhFFv
function name:  (null)
number of ops:  30
compiled vars:  !0 = $str, !1 = $word, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'AULIA'
    4     1        ASSIGN                                                   !1, ''
    6     2        INIT_FCALL                                               'array_slice'
          3        INIT_FCALL                                               'explode'
          4        SEND_VAL                                                 '+'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $5      
          7        SEND_VAR                                                 $5
          8        SEND_VAL                                                 0
          9        SEND_VAL                                                 3
         10        DO_ICALL                                         $6      
         11      > FE_RESET_R                                       $7      $6, ->16
         12    > > FE_FETCH_R                                               $7, !2, ->16
         13    >   FETCH_DIM_R                                      ~8      !2, 0
         14        ASSIGN_OP                                     8          !1, ~8
         15      > JMP                                                      ->12
         16    >   FE_FREE                                                  $7
    7    17        STRLEN                                           ~10     !1
         18        IS_SMALLER                                               ~10, 3
         19      > JMPZ                                                     ~11, ->28
         20    >   INIT_FCALL                                               'substr'
         21        SEND_VAR                                                 !2
         22        SEND_VAL                                                 1
         23        STRLEN                                           ~12     !1
         24        SUB                                              ~13     3, ~12
         25        SEND_VAL                                                 ~13
         26        DO_ICALL                                         $14     
         27        ASSIGN_OP                                     8          !1, $14
    8    28    >   ECHO                                                     !1
    9    29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.5 ms | 1401 KiB | 19 Q