3v4l.org

run code in 300+ PHP versions simultaneously
<?php function acronym(string $text): array { preg_match_all('/\b\w/', $text, $matches); $letters = array_map('strtolower', $matches[0]); return $letters; } print_r(acronym('Ruby on Rails'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LX8XL
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'print_r'
          1        INIT_FCALL                                               'acronym'
          2        SEND_VAL                                                 'Ruby+on+Rails'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function acronym:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LX8XL
function name:  acronym
number of ops:  16
compiled vars:  !0 = $text, !1 = $matches, !2 = $letters
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        INIT_FCALL                                               'preg_match_all'
          2        SEND_VAL                                                 '%2F%5Cb%5Cw%2F'
          3        SEND_VAR                                                 !0
          4        SEND_REF                                                 !1
          5        DO_ICALL                                                 
    4     6        INIT_FCALL                                               'array_map'
          7        SEND_VAL                                                 'strtolower'
          8        FETCH_DIM_R                                      ~4      !1, 0
          9        SEND_VAL                                                 ~4
         10        DO_ICALL                                         $5      
         11        ASSIGN                                                   !2, $5
    5    12        VERIFY_RETURN_TYPE                                       !2
         13      > RETURN                                                   !2
    6    14*       VERIFY_RETURN_TYPE                                       
         15*     > RETURN                                                   null

End of function acronym

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.68 ms | 1015 KiB | 17 Q