As photonic linear computations are diverse and easy to realize while photonic nonlinear computations are relatively limited and difficult, we propose a novel way to perform photonic nonlinear computations by linear operations in a high-dimensional space, which can achieve many nonlinear functions different from existing optical methods. As a practical application, the arbitrary binary nonlinear computations between two Boolean signals are demonstrated to implement a programmable logic array. In the experiment, by programming the high-dimensional photonic matrix multiplier, we execute fourteen different logic operations with only one fixed nonlinear operation. Then the combined logic functions of half-adder and comparator are demonstrated at 10 Gbit/s. Compared with current methods, the proposed scheme simplifies the devices and the nonlinear operations for programmable logic computing. More importantly, nonlinear realization assisted by space transformation offers a new solution for optical digital computing and enriches the diversity of photonic nonlinear computing.