3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { const PRODUCT_STATUS_ACTIVE = 1; const PRODUCT_STATUS_INACTIVE = 0; const PRODUCT_STATUS_REJECT = 2; const PRODUCT_STATUS_DELETE = 3; const PRODUCT_STATUS_LABELS = [ self::PRODUCT_STATUS_INACTIVE => 'Inactive', self::PRODUCT_STATUS_ACTIVE => 'Active', self::PRODUCT_STATUS_REJECT => 'Rejected', self::PRODUCT_STATUS_DELETE => 'Deleted' ]; } $productStatus = 0; echo (array_key_exists($productStatus, array_flip(A::PRODUCT_STATUS_LABELS)));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dksfb
function name:  (null)
number of ops:  7
compiled vars:  !0 = $productStatus
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   ASSIGN                                                   !0, 0
   19     1        INIT_FCALL                                               'array_flip'
          2        SEND_VAL                                                 <array>
          3        DO_ICALL                                         $2      
          4        ARRAY_KEY_EXISTS                                 ~3      !0, $2
          5        ECHO                                                     ~3
          6      > RETURN                                                   1

Class A: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.63 ms | 1003 KiB | 14 Q