I want to know how to create a language like PHP. How does the server know how to translate a PHP file? How does it work? I want to do this for educational purposes. A simple language with basic features like echo, etc.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In basics, when webserver get’s request to process php file it translating this request to php processor, it could be a module (like php.so in apache) or service (like php-cgi). Service or module compiles php script to machine code, executes it and gives the server the result of his job. You can download php source code from http://php.net. Source code include parser, thanslator, compiler and other components needed to execute php script as machine code