3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.66 ms | 1398 KiB | 13 Q