C ++ how to call PHP functions

Source: Internet
Author: User
How can c ++ call PHP functions? for example, how can c ++ call PHP's time () function c ++ get the current time and write dozens of lines of code to crash ..


Reply to discussion (solution)

C ++ cannot call php functions,
In turn, you can compile the c ++ program into a dll and mount it to php for php to call.

C ++ cannot call php functions,
In turn, you can compile the c ++ program into a dll and mount it to php for php to call.

Why can't php be written in c?

Reply by referencing the potency on the first floor:
C ++ cannot call php functions,
In turn, you can compile the c ++ program into a dll and mount it to php for php to call.
Why can't php be written in c?
--------------------------------------------------------
This process is irreversible. C ++ is a compilation language. Compiled into machine code. Php is a dynamic language. Machine code cannot be compiled.
I cannot compile it into a machine code language. how can I write it in a machine code language? Languages that cannot be compiled into machine code are run through virtual machines.

Reply by referencing the potency on the first floor:
C ++ cannot call php functions,
In turn, you can compile the c ++ program into a dll and mount it to php for php to call.
Why can't php be written in c?
--------------------------------------------------------
This process is irreversible. C ++ is a compilation language. Compiled into machine code. Php is a dynamic language. Machine code cannot be compiled.
I cannot compile it into a machine code language. how can I write it in a machine code language? Languages that cannot be compiled into machine code are run through virtual machines.

Haha understand

It seems that there is no such saying. if you want to call it, you may wish to study the dll files in php, which is a little difficult.

Frequently-used functions can be used to write a package.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.