3v4l.org

run code in 300+ PHP versions simultaneously
<?php $texts = [ 3 => 'Fizz', 5 => 'Buzz', 7 => 'Gezz' ]; echo join(', ', array_map(function($x) use ($texts) { $y = ''; foreach($texts as $d=>$text) { if($x%$d==0) $y .= $text; } return $y?:$x; }, range(1, 100)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5YsJq
function name:  (null)
number of ops:  17
compiled vars:  !0 = $texts
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    8     1        INIT_FCALL                                               'join'
          2        SEND_VAL                                                 '%2C+'
          3        INIT_FCALL                                               'array_map'
          4        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F5YsJq%3A8%240'
          5        BIND_LEXICAL                                             ~2, !0
   16     6        SEND_VAL                                                 ~2
          7        INIT_FCALL                                               'range'
          8        SEND_VAL                                                 1
          9        SEND_VAL                                                 100
         10        DO_ICALL                                         $3      
         11        SEND_VAR                                                 $3
         12        DO_ICALL                                         $4      
         13        SEND_VAR                                                 $4
         14        DO_ICALL                                         $5      
         15        ECHO                                                     $5
         16      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F5YsJq%3A8%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 11
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 10
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 10
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/5YsJq
function name:  {closure}
number of ops:  16
compiled vars:  !0 = $x, !1 = $texts, !2 = $y, !3 = $text, !4 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
   10     2        ASSIGN                                                   !2, ''
   11     3      > FE_RESET_R                                       $6      !1, ->11
          4    > > FE_FETCH_R                                       ~7      $6, !3, ->11
          5    >   ASSIGN                                                   !4, ~7
   13     6        MOD                                              ~9      !0, !4
          7        IS_EQUAL                                                 ~9, 0
          8      > JMPZ                                                     ~10, ->10
          9    >   ASSIGN_OP                                     8          !2, !3
   11    10    > > JMP                                                      ->4
         11    >   FE_FREE                                                  $6
   15    12        JMP_SET                                          ~12     !2, ->14
         13        QM_ASSIGN                                        ~12     !0
         14      > RETURN                                                   ~12
   16    15*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F5YsJq%3A8%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.45 ms | 1396 KiB | 19 Q