This article mainly introduces PHP class declaration and PHP class usage examples. Friends who need it can refer to it
The code is as follows: method name (parameters, parameters...) echo $com -> add(1,2); echo $com -> jf(1,2); echo $com -> cf(1,2); //When these methods are called by buttons, you can simply write a calculator. //Each button corresponds to a method ?>