3v4l.org

run code in 300+ PHP versions simultaneously
<?php function status(int $now) { return sprintf( '%d is %s', $now, match (true) { $now % 2 == 0 => 'even', default => 'odd' } ); } $now = time(); var_dump(status($now), status($now + 1));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2s8uK
function name:  (null)
number of ops:  15
compiled vars:  !0 = $now
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'time'
          1        DO_ICALL                                         $1      
          2        ASSIGN                                                   !0, $1
   16     3        INIT_FCALL                                               'var_dump'
          4        INIT_FCALL                                               'status'
          5        SEND_VAR                                                 !0
          6        DO_FCALL                                      0  $3      
          7        SEND_VAR                                                 $3
          8        INIT_FCALL                                               'status'
          9        ADD                                              ~4      !0, 1
         10        SEND_VAL                                                 ~4
         11        DO_FCALL                                      0  $5      
         12        SEND_VAR                                                 $5
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Function status:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
filename:       /in/2s8uK
function name:  status
number of ops:  17
compiled vars:  !0 = $now
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'sprintf'
    6     2        SEND_VAL                                                 '%25d+is+%25s'
    7     3        SEND_VAR                                                 !0
    9     4        MOD                                              ~2      !0, 2
          5        IS_EQUAL                                         ~3      ~2, 0
          6        IS_IDENTICAL                                             ~3, <true>
          7      > JMPNZ                                                    ~1, ->9
          8    > > JMP                                                      ->11
          9    >   QM_ASSIGN                                        ~4      'even'
         10      > JMP                                                      ->13
   10    11    >   QM_ASSIGN                                        ~4      'odd'
         12      > JMP                                                      ->13
         13    >   SEND_VAL                                                 ~4
    5    14        DO_ICALL                                         $5      
   10    15      > RETURN                                                   $5
   13    16*     > RETURN                                                   null

End of function status

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.01 ms | 1003 KiB | 18 Q