<?php


class Aa
{
    static public $enums=[
        'status'=>[
            '在库外'=>6,
            '在U型线'=>1,
            '在出库中'=>2,
            '在入库中'=>3,
            '在立库'=>4,
            '异常'=>5,
        ],
    ];
    function __construct(array $attributes = [])
    {
        foreach (self::$enums as &$enum) {
            $enum=$enum+array_flip($enum);
        }
    }

}

$aa = new Aa();
var_dump(Aa::$enums['status'][1]);
