3v4l.org

run code in 300+ PHP versions simultaneously
<?php final class DemoFile { public function getError(int $code) : ?string { $error = null; $error = match ($code) { 10 => 'code_10', 11 => 'code_11', }; return $error; } } $demo = new DemoFile(); var_dump($demo->getError(10)); var_dump($demo->getError(11)); var_dump($demo->getError(12));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/E64Um
function name:  (null)
number of ops:  22
compiled vars:  !0 = $demo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $1      'DemoFile'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   19     3        INIT_FCALL                                               'var_dump'
          4        INIT_METHOD_CALL                                         !0, 'getError'
          5        SEND_VAL_EX                                              10
          6        DO_FCALL                                      0  $4      
          7        SEND_VAR                                                 $4
          8        DO_ICALL                                                 
   20     9        INIT_FCALL                                               'var_dump'
         10        INIT_METHOD_CALL                                         !0, 'getError'
         11        SEND_VAL_EX                                              11
         12        DO_FCALL                                      0  $6      
         13        SEND_VAR                                                 $6
         14        DO_ICALL                                                 
   21    15        INIT_FCALL                                               'var_dump'
         16        INIT_METHOD_CALL                                         !0, 'getError'
         17        SEND_VAL_EX                                              12
         18        DO_FCALL                                      0  $8      
         19        SEND_VAR                                                 $8
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Class DemoFile:
Function geterror:
Finding entry points
Branch analysis from position: 0
3 jumps found. (Code = 195) Position 1 = 4, Position 2 = 6, Position 3 = 3
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 3
1 jumps found. (Code = 197) Position 1 = -2
filename:       /in/E64Um
function name:  getError
number of ops:  13
compiled vars:  !0 = $code, !1 = $error
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        ASSIGN                                                   !1, null
    9     2      > MATCH                                                    !0, [ 10:->4, 11:->6, ], ->3
          3    > > MATCH_ERROR                                              !0
   10     4    >   QM_ASSIGN                                        ~4      'code_10'
          5      > JMP                                                      ->8
   11     6    >   QM_ASSIGN                                        ~4      'code_11'
          7      > JMP                                                      ->8
    9     8    >   ASSIGN                                                   !1, ~4
   14     9        VERIFY_RETURN_TYPE                                       !1
         10      > RETURN                                                   !1
   15    11*       VERIFY_RETURN_TYPE                                       
         12*     > RETURN                                                   null

End of function geterror

End of class DemoFile.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.95 ms | 1427 KiB | 14 Q