3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = 1; switch($test) { case 'test': echo 'yes'; break; default: echo 'darn'; }
Finding entry points
Branch analysis from position: 0
3 jumps found. (Code = 188) Position 1 = 5, Position 2 = 7, Position 3 = 2
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 5
filename:       /in/0uf2L
function name:  (null)
number of ops:  9
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 1
    5     1      > SWITCH_STRING                                            !0, [ 'test':->5, ], ->7
    7     2    >   IS_EQUAL                                                 !0, 'test'
          3      > JMPNZ                                                    ~2, ->5
          4    > > JMP                                                      ->7
    8     5    >   ECHO                                                     'yes'
    9     6      > JMP                                                      ->8
   12     7    >   ECHO                                                     'darn'
   13     8    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.21 ms | 1393 KiB | 13 Q