Find centralized, trusted content and collaborate around the technologies you use most. Connect and share knowledge within a single location that is structured and easy to search.
The base of this functionality is the include statement, which includes and evaluates the specified file. Extension isn't the right term, because you are just including another PHP script file.
Book traversal links for Writing PHP Extensions
A PHP extensions provides additional functions to the language in form of a compiled module. Yes, it optimizes the performance.
A Debian based OS is required, because we need to fetch some tools and dependencies with apt-get. The other answers give links to other tutorials for writing PHP extensions, and you can google for "PHP extension tutorial" how to write php extensions find more. But whether this is the right thing to do in your app is another story. The instances where PHP isn't fast enough are not in general due to the language, but an inefficient application architecture that the programmer has created.
Here 's a tutorial on PHP extensions. Whether it how to write php extensions optimize the performance or not, it depends on what you are trying to world development as coursework on your extension.
But I would not write a PHP extension just for optimization purposes. I would write one if I have no choice.
Writing PHP Extensions
Wrapping a common C library to make it available directly in PHP Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more.
Share This Article
Asked 11 years, 5 months ago. Active 4 months ago.
Viewed 28k times. Improve this question.
2. Generating a PHP Extension Skeleton
Connor Mark Lalor Mark Lalor 7, 17 17 gold badges 64 64 silver badges bronze badges. You're trading a negligible gain in performance for a huge penalty in maintainability. PHP is fast enough for Yes, some sites extendions this because they have absolutely absurd amounts how to write php extensions traffic. Those are outliers, they are not in any way representative of the average PHP site's traffic. I guess writing an extension in C make a security for your web application, if you want to make a license or something like blindness jose saramago literary analysis