How to build matrix?

Although I have searched a lot of posts related to this topic, but because the time has passed, it is invalid.
I have read related posts before using jsonnet instead of matrix.But in recent months the documentation has been revised, and it’s hard to understand how many changes have been made. I think you should write the instructions in the documentation.

For example, I want to build php and its variant(see here), I can use travis to set environment variables directly (Looks like the matrix in the 0.8 version of the drone). But now the latest version of the drone I don’t know how to do it.

I think you need to explain the latest version of the drone in this regard.

see Porting matrix builds to 1.0 multi-machine pipelines

Thanks Reply
I suggest that the content of that post be also written in the document.
Because I searched jsonnet in the document, I can only find some simple content, such as environment variable DRONE_JSONNET_ENABLED, drone jsonnet command and so on. The content of the document should be more detailed.