3v4l.org

run code in 500+ 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 = 5, Position 2 = 6
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
filename:       /in/2s8uK
function name:  status
number of ops:  16
compiled vars:  !0 = $now
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    9     1        MOD                                                  ~2      !0, 2
          2        IS_EQUAL                                             ~3      ~2, 0
          3        IS_IDENTICAL                                                 ~3, <true>
          4      > JMPNZ                                                        ~1, ->6
          5    > > JMP                                                          ->8
          6    >   QM_ASSIGN                                            ~4      'even'
          7      > JMP                                                          ->10
   10     8    >   QM_ASSIGN                                            ~4      'odd'
          9      > JMP                                                          ->10
         10    >   CAST                                              4  ~5      !0
         11        ROPE_INIT                                         3  ~7      ~5
         12        ROPE_ADD                                          1  ~7      ~7, '+is+'
         13        ROPE_END                                          2  ~6      ~7, ~4
         14      > RETURN                                                       ~6
   13    15*     > RETURN                                                       null

End of function status

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
172.38 ms | 1346 KiB | 17 Q