3v4l.org

run code in 300+ PHP versions simultaneously
<?php (int)$value == 1 ? (int)1 : ((int)$value == 2 ? (int)0 : null);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
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: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FZeiF
function name:  (null)
number of ops:  16
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   CAST                                          4  ~1      !0
          1        IS_EQUAL                                                 ~1, 1
          2      > JMPZ                                                     ~2, ->6
          3    >   CAST                                          4  ~3      1
          4        QM_ASSIGN                                        ~4      ~3
          5      > JMP                                                      ->14
          6    >   CAST                                          4  ~5      !0
          7        IS_EQUAL                                                 ~5, 2
          8      > JMPZ                                                     ~6, ->12
          9    >   CAST                                          4  ~7      0
         10        QM_ASSIGN                                        ~8      ~7
         11      > JMP                                                      ->13
         12    >   QM_ASSIGN                                        ~8      null
         13    >   QM_ASSIGN                                        ~4      ~8
         14    >   FREE                                                     ~4
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.51 ms | 1394 KiB | 13 Q