3v4l.org

run code in 300+ PHP versions simultaneously
<?php function generateUserFIO(array $names) { return implode( ' ', [ ucfirst(strtolower($names['last_name'])), (substr($names['first_name'], 0, 2) . '.'), (substr($names['middle_name'], 0, 2) . '.'), ] ); } print_r(generateUserFIO([ 'last_name' => 'Гопкало', 'first_name' => 'Никита', 'middle_name' => 'Владимирович', ]));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mdGWi
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'print_r'
          1        INIT_FCALL                                               'generateuserfio'
   15     2        SEND_VAL                                                 <array>
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
   18     6      > RETURN                                                   1

Function generateuserfio:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mdGWi
function name:  generateUserFIO
number of ops:  31
compiled vars:  !0 = $names
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'implode'
    5     2        SEND_VAL                                                 '+'
    7     3        INIT_FCALL                                               'ucfirst'
          4        INIT_FCALL                                               'strtolower'
          5        FETCH_DIM_R                                      ~1      !0, 'last_name'
          6        SEND_VAL                                                 ~1
          7        DO_ICALL                                         $2      
          8        SEND_VAR                                                 $2
          9        DO_ICALL                                         $3      
         10        INIT_ARRAY                                       ~4      $3
    8    11        INIT_FCALL                                               'substr'
         12        FETCH_DIM_R                                      ~5      !0, 'first_name'
         13        SEND_VAL                                                 ~5
         14        SEND_VAL                                                 0
         15        SEND_VAL                                                 2
         16        DO_ICALL                                         $6      
         17        CONCAT                                           ~7      $6, '.'
         18        ADD_ARRAY_ELEMENT                                ~4      ~7
    9    19        INIT_FCALL                                               'substr'
         20        FETCH_DIM_R                                      ~8      !0, 'middle_name'
         21        SEND_VAL                                                 ~8
         22        SEND_VAL                                                 0
         23        SEND_VAL                                                 2
         24        DO_ICALL                                         $9      
         25        CONCAT                                           ~10     $9, '.'
         26        ADD_ARRAY_ELEMENT                                ~4      ~10
         27        SEND_VAL                                                 ~4
         28        DO_ICALL                                         $11     
         29      > RETURN                                                   $11
   12    30*     > RETURN                                                   null

End of function generateuserfio

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.36 ms | 1390 KiB | 24 Q