I locked my Iphone 5 and forgot the lock code. What will I do to unlock it?

I needed to recall the lock code. I have tried repeatedly but without success. Help.
Welcome to iMore! You'll need to erase your iPhone and then restore it or start from scratch. Follow the link for more info.
https://support.apple.com/en-us/HT204306

Original thread: https://forums.imore.com/threads/i-locked-my-iphone-5-and-forgot-the-lock-code-what-will-i-do-to-unlock-it.384695/