3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo join(', ', array_map(function($x) { switch(2*($x%3==0)-($x%5==0)) { case 2 : return 'Fizz'; case -1: return 'Buzz'; case 1 : 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/aapS6
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%2FaapS6%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%2FaapS6%3A3%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 14
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 18
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aapS6
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        MUL                                              ~3      ~2, 2
          4        MOD                                              ~4      !0, 5
          5        IS_EQUAL                                         ~5      ~4, 0
          6        SUB                                              ~6      ~3, ~5
    7     7        CASE                                                     ~6, 2
          8      > JMPNZ                                                    ~7, ->14
    5     9    >   CASE                                                     ~6, -1
         10      > JMPNZ                                                    ~7, ->16
    9    11    >   CASE                                                     ~6, 1
         12      > JMPNZ                                                    ~7, ->18
         13    > > JMP                                                      ->20
    7    14    >   FREE                                                     ~6
         15      > RETURN                                                   'Fizz'
    8    16    >   FREE                                                     ~6
         17      > RETURN                                                   'Buzz'
    9    18    >   FREE                                                     ~6
         19      > RETURN                                                   'FizzBuzz'
   10    20    >   FREE                                                     ~6
         21      > RETURN                                                   !0
         22*       FREE                                                     ~6
   12    23*     > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.76 ms | 1400 KiB | 19 Q