3v4l.org

run code in 500+ PHP versions simultaneously
<?php $result = match ('foo') { 'foo' => (function () { return 'bar'; }) }; var_dump($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
1 jumps found. (Code = 197) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vACd5
function name:  (null)
number of ops:  12
compiled vars:  !0 = $result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   IS_IDENTICAL                                                 'foo', 'foo'
          1      > JMPNZ                                                        ~1, ->4
          2    > > JMP                                                          ->3
          3    > > MATCH_ERROR                                                  'foo'
          4    >   DECLARE_LAMBDA_FUNCTION                              ~2      [0]
    6     5        QM_ASSIGN                                            ~3      ~2
          6      > JMP                                                          ->7
    3     7    >   ASSIGN                                                       !0, ~3
    9     8        INIT_FCALL                                                   'var_dump'
          9        SEND_VAR                                                     !0
         10        DO_ICALL                                                     
         11      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vACd5
function name:  {closure:/in/vACd5:4}
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                       'bar'
    6     1*     > RETURN                                                       null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
126.63 ms | 477 KiB | 8 Q