3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = 1; $switch = "switch ($input) {"; for($case = 1; $case < 100; $case++) { $switch .= "case $case: break;"; } $switch .= '}'; echo eval('<?php' . $switch . '?>');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 7
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 7
Branch analysis from position: 14
Branch analysis from position: 7
filename:       /in/37mR6
function name:  (null)
number of ops:  20
compiled vars:  !0 = $input, !1 = $switch, !2 = $case
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 1
    4     1        ROPE_INIT                                     3  ~5      'switch+%28'
          2        ROPE_ADD                                      1  ~5      ~5, !0
          3        ROPE_END                                      2  ~4      ~5, '%29+%7B'
          4        ASSIGN                                                   !1, ~4
    5     5        ASSIGN                                                   !2, 1
          6      > JMP                                                      ->12
    6     7    >   ROPE_INIT                                     3  ~10     'case+'
          8        ROPE_ADD                                      1  ~10     ~10, !2
          9        ROPE_END                                      2  ~9      ~10, '%3A+break%3B'
         10        ASSIGN_OP                                     8          !1, ~9
    5    11        PRE_INC                                                  !2
         12    >   IS_SMALLER                                               !2, 100
         13      > JMPNZ                                                    ~14, ->7
    9    14    >   ASSIGN_OP                                     8          !1, '%7D'
   11    15        CONCAT                                           ~16     '%3C%3Fphp', !1
         16        CONCAT                                           ~17     ~16, '%3F%3E'
         17        INCLUDE_OR_EVAL                                  $18     ~17, EVAL
         18        ECHO                                                     $18
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.94 ms | 1394 KiB | 13 Q