While I switched to C ++ and got a good answer on codereview , I will simply answer my question here.
There is another way to make it more time-efficient by increasing memory usage (this is not a very big increase compared to array array of array s ... approach). This approach is called "double array trie" and you can read the information on this topic here and read the above answer on codereview to see an example implementation.
This is a more economical time, but it provides less flexibility / usability for future trie use (compared to the OOP approach).
So, the final answer to this question is for me: "php is not the best tool to work with really big attempts with."
source share