I have a recursive regular expression to get text between brackets []:
preg_match_all("#\[(([^\[\]]*|(?R))*)\]#", $string, $matches);
It works fine and I've been using it in PHP 5.6 and 7.0 without any trouble. I've upgraded my server to PHP 7.3 and it stopped working for long texts (more than 500,000 characters long).
On a long text containing brackets, the expression returns all results with PHP 5.6 and 7.0, as it should.
With PHP 7.3, it returns an empty $matches array without sending any error or warning message.
I don't know why that is. PCRE is configured the same in all my versions of PHP. The problem only occurs for long texts. I couldn't find any mention of that problem in PHP migration guides.