3v4l.org

run code in 500+ PHP versions simultaneously
<?php final class FromVariable { public static function run($filter, bool $variable = true, bool $variable2 = false) { $result = match (true) { $variable => 'a', $variable2 => 'b', default => throw new \InvalidArgumentException(), }; var_dump($result); } } FromVariable::run(false, true, false);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/I4IF9
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   17     0  E >   INIT_STATIC_METHOD_CALL                                      'FromVariable', 'run'
          1        SEND_VAL                                                     <false>
          2        SEND_VAL                                                     <true>
          3        SEND_VAL                                                     <false>
          4        DO_FCALL                                          0          
          5      > RETURN                                                       1

Class FromVariable:
Function run:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
filename:       /in/I4IF9
function name:  run
number of ops:  22
compiled vars:  !0 = $filter, !1 = $variable, !2 = $variable2, !3 = $result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   RECV                                                 !0      
          1        RECV_INIT                                            !1      <true>
          2        RECV_INIT                                            !2      <false>
    8     3        IS_IDENTICAL                                                 !1, <true>
          4      > JMPNZ                                                        ~4, ->8
    9     5    >   IS_IDENTICAL                                                 !2, <true>
          6      > JMPNZ                                                        ~4, ->10
          7    > > JMP                                                          ->12
    8     8    >   QM_ASSIGN                                            ~5      'a'
          9      > JMP                                                          ->17
    9    10    >   QM_ASSIGN                                            ~5      'b'
         11      > JMP                                                          ->17
   10    12    >   NEW                                                  $6      'InvalidArgumentException'
         13        DO_FCALL                                          0          
         14      > THROW                                             1          $6
         15*       QM_ASSIGN                                            ~5      <true>
         16*       JMP                                                          ->17
    7    17    >   ASSIGN                                                       !3, ~5
   13    18        INIT_FCALL                                                   'var_dump'
         19        SEND_VAR                                                     !3
         20        DO_ICALL                                                     
   14    21      > RETURN                                                       null

End of function run

End of class FromVariable.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
127.1 ms | 480 KiB | 8 Q