3v4l.org

run code in 300+ PHP versions simultaneously
<?php function concatenate($transform, ...$strings) { $string = ''; foreach($strings as $piece) { $string .= $piece; } return($transform($string)); } echo concatenate("strtoupper", "I'd ", "like ", 4 + 2, " apples");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/llbbJ
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'concatenate'
          1        SEND_VAL                                                 'strtoupper'
          2        SEND_VAL                                                 'I%27d+'
          3        SEND_VAL                                                 'like+'
          4        SEND_VAL                                                 6
          5        SEND_VAL                                                 '+apples'
          6        DO_FCALL                                      0  $0      
          7        ECHO                                                     $0
          8      > RETURN                                                   1

Function concatenate:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/llbbJ
function name:  concatenate
number of ops:  13
compiled vars:  !0 = $transform, !1 = $strings, !2 = $string, !3 = $piece
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV_VARIADIC                                    !1      
    4     2        ASSIGN                                                   !2, ''
    5     3      > FE_RESET_R                                       $5      !1, ->7
          4    > > FE_FETCH_R                                               $5, !3, ->7
    6     5    >   ASSIGN_OP                                     8          !2, !3
    5     6      > JMP                                                      ->4
          7    >   FE_FREE                                                  $5
    8     8        INIT_DYNAMIC_CALL                                        !0
          9        SEND_VAR_EX                                              !2
         10        DO_FCALL                                      0  $7      
         11      > RETURN                                                   $7
    9    12*     > RETURN                                                   null

End of function concatenate

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.48 ms | 1398 KiB | 14 Q