3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); $foo = 1; switch($foo) { case true: print "foo is true (foo=$foo)"; break; case 1: print "foo is 1; (foo=$foo)"; break; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 5, Position 2 = 11
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
filename:       /in/AUNE8
function name:  (null)
number of ops:  17
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 1
    5     1        IS_EQUAL                                                 !0, <true>
          2      > JMPNZ                                                    ~2, ->6
   10     3    >   IS_EQUAL                                                 !0, 1
          4      > JMPNZ                                                    ~2, ->11
          5    > > JMP                                                      ->16
    8     6    >   ROPE_INIT                                     3  ~4      'foo+is+true+%28foo%3D'
          7        ROPE_ADD                                      1  ~4      ~4, !0
          8        ROPE_END                                      2  ~3      ~4, '%29'
          9        ECHO                                                     ~3
    9    10      > JMP                                                      ->16
   11    11    >   ROPE_INIT                                     3  ~7      'foo+is+1%3B+%28foo%3D'
         12        ROPE_ADD                                      1  ~7      ~7, !0
         13        ROPE_END                                      2  ~6      ~7, '%29'
         14        ECHO                                                     ~6
   12    15      > JMP                                                      ->16
   13    16    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.47 ms | 1393 KiB | 13 Q