@Min-Liu I would like some time to review the php lexer code as the powershell and python lexer shows better performance with the same text pasted under similar test conditions. Perhaps there is some bad code logic preventing good progression of the styling in the php lexer. This needs some proving in some way to recognize the lexer as bugged and will test in SciTE with similar settings to reproduce the bug.
LuaScript as suggested can help you for now though if the php lexer needs a fix then it should get priority with posting an issue and where it should be posted. This may take some time as the lexer code is complex.
@PeterJones I just tested in SciTE SC1 version 5.5.8 Scintilla:5.5.8 Lexilla:5.4.6 with idle.styling=3 in SciTEGlobal.properties. It pastes the 50,000 lines without freezing into a .php file. Can you possibly confirm this test as this implies the php lexer is OK in SciTE, yet is not OK in Notepad++. If confirmed, then the lexer seems OK and goes back to being a Notepad++ issue. The idle styling was not the only setting in Notepad++ that was changed. The versions of Scintilla/Lexilla match with Notepad++ 8.9.