3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo join(', ', array_map(function($x) { switch(($x%3==0) / ($x%5 ==0)) { case 0: return 'Fizz'; case INF: return 'Buzz'; case NAN: return 'FizzBuzz'; default: return x; } }, range(1, 100)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1BKEs
function name:  (null)
number of ops:  15
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'join'
          1        SEND_VAL                                                 '%2C+'
          2        INIT_FCALL                                               'array_map'
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F1BKEs%3A3%240'
   12     4        SEND_VAL                                                 ~0
          5        INIT_FCALL                                               'range'
          6        SEND_VAL                                                 1
          7        SEND_VAL                                                 100
          8        DO_ICALL                                         $1      
          9        SEND_VAR                                                 $1
         10        DO_ICALL                                         $2      
         11        SEND_VAR                                                 $2
         12        DO_ICALL                                         $3      
         13        ECHO                                                     $3
         14      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F1BKEs%3A3%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 13
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 17
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1BKEs
function name:  {closure}
number of ops:  24
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        MOD                                              ~1      !0, 3
          2        IS_EQUAL                                         ~2      ~1, 0
          3        MOD                                              ~3      !0, 5
          4        IS_EQUAL                                         ~4      ~3, 0
          5        DIV                                              ~5      ~2, ~4
    7     6        CASE                                                     ~5, 0
          7      > JMPNZ                                                    ~6, ->13
    5     8    >   CASE                                                     ~5, INF
          9      > JMPNZ                                                    ~6, ->15
    9    10    >   CASE                                                     ~5, NAN
         11      > JMPNZ                                                    ~6, ->17
         12    > > JMP                                                      ->19
    7    13    >   FREE                                                     ~5
         14      > RETURN                                                   'Fizz'
    8    15    >   FREE                                                     ~5
         16      > RETURN                                                   'Buzz'
    9    17    >   FREE                                                     ~5
         18      > RETURN                                                   'FizzBuzz'
   10    19    >   FETCH_CONSTANT                                   ~7      'x'
         20        FREE                                                     ~5
         21      > RETURN                                                   ~7
         22*       FREE                                                     ~5
   12    23*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F1BKEs%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.2 ms | 1400 KiB | 19 Q