3v4l.org

run code in 300+ PHP versions simultaneously
<?php enum CommentPreview: int { case Disabled = 0; case Optional = 1; case Required = 2; } function setCommentPreview($mode, $field_name = 'comment') { $mode_text = match($mode) { CommentPreview::Disabled => 'disabled', CommentPreview::Optional => 'optional', }; echo $mode_text; } setCommentPreview(CommentPreview::Disabled);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LqvOH
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'commentpreview'
   20     1        INIT_FCALL                                               'setcommentpreview'
          2        FETCH_CLASS_CONSTANT                             ~0      'CommentPreview', 'Disabled'
          3        SEND_VAL                                                 ~0
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Function setcommentpreview:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 5, Position 2 = 10
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 197) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
filename:       /in/LqvOH
function name:  setCommentPreview
number of ops:  17
compiled vars:  !0 = $mode, !1 = $field_name, !2 = $mode_text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      'comment'
   14     2        FETCH_CLASS_CONSTANT                             ~4      'CommentPreview', 'Disabled'
          3        IS_IDENTICAL                                             !0, ~4
          4      > JMPNZ                                                    ~3, ->10
   15     5    >   FETCH_CLASS_CONSTANT                             ~5      'CommentPreview', 'Optional'
          6        IS_IDENTICAL                                             !0, ~5
          7      > JMPNZ                                                    ~3, ->12
          8    > > JMP                                                      ->9
          9    > > MATCH_ERROR                                              !0
   14    10    >   QM_ASSIGN                                        ~6      'disabled'
         11      > JMP                                                      ->14
   15    12    >   QM_ASSIGN                                        ~6      'optional'
         13      > JMP                                                      ->14
   13    14    >   ASSIGN                                                   !2, ~6
   17    15        ECHO                                                     !2
   18    16      > RETURN                                                   null

End of function setcommentpreview

Class CommentPreview: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.28 ms | 999 KiB | 14 Q