3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo 'Testing',"\n"; function Test() { $a = 0; switch($a) { case 0: echo 'zero'; break; case 1: echo 'one'; break; default: echo 'nada'; break; } return true; } echo Test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UUdTl
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ECHO                                                     'Testing'
          1        ECHO                                                     '%0A'
   14     2        INIT_FCALL                                               'test'
          3        DO_FCALL                                      0  $0      
          4        ECHO                                                     $0
          5      > RETURN                                                   1

Function test:
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 = 8
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
filename:       /in/UUdTl
function name:  Test
number of ops:  14
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, 0
    8     1        IS_EQUAL                                                 !0, 0
          2      > JMPNZ                                                    ~2, ->6
    9     3    >   IS_EQUAL                                                 !0, 1
          4      > JMPNZ                                                    ~2, ->8
          5    > > JMP                                                      ->10
    8     6    >   ECHO                                                     'zero'
          7      > JMP                                                      ->12
    9     8    >   ECHO                                                     'one'
          9      > JMP                                                      ->12
   10    10    >   ECHO                                                     'nada'
         11      > JMP                                                      ->12
   12    12    > > RETURN                                                   <true>
   13    13*     > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158 ms | 1389 KiB | 14 Q