The OP_OVER opcode is used to duplicate the second-to-top item on the stack, placing this copy on top of the stack. It is often used in scripts that require the reuse of a previous value while keeping the original stack order intact, such as in scripts that perform repeated calculations or comparisons with a specific stack item.
OP_Code Walkthrough
Copies the second-to-top stack item to the top.
Pop Top Item 1
Pop Top Item 2
Push Item 2
Push Item 1
Push Item 2