How programs written in interpreted languages are executed if they are never translated into machine language?

Viewed 640

Computers can only understand machine language. Then how come interepreters execute a program directly without translating it into machine language? For example:

<?php
    echo "Hello, World!" ;

It's a simple Hello World program written in PHP. How does it execute in machine while the machine has no idea what echo is? How does it output what's expected, in this case, the string Hello, World!?

2 Answers
Related