3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data['is_partner'] = 'Yes'; $partner = $data['is_partner'] == "Yes" ? 1 : 0; echo $data['is_partner']; echo $partner; die(); // Always returns 0 no matter what. Why is this?
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/gqaBs
function name:  (null)
number of ops:  14
compiled vars:  !0 = $data, !1 = $partner
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN_DIM                                               !0, 'is_partner'
          1        OP_DATA                                                  'Yes'
    5     2        FETCH_DIM_R                                      ~3      !0, 'is_partner'
          3        IS_EQUAL                                                 ~3, 'Yes'
          4      > JMPZ                                                     ~4, ->7
          5    >   QM_ASSIGN                                        ~5      1
          6      > JMP                                                      ->8
          7    >   QM_ASSIGN                                        ~5      0
          8    >   ASSIGN                                                   !1, ~5
    6     9        FETCH_DIM_R                                      ~7      !0, 'is_partner'
         10        ECHO                                                     ~7
    7    11        ECHO                                                     !1
    8    12      > EXIT                                                     
   10    13*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.05 ms | 1393 KiB | 13 Q