Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added KPHP compiler #1201

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Danil42Russia
Copy link

@Danil42Russia Danil42Russia commented Sep 12, 2022

Features

  • KPHP analyzes your code as a whole and performs various optimizations focusing on performance and safety.
  • Inferring types of all variables, how to declare them in C++.
  • Compile-time optimizations, such as inlining getters or reducing refcounters flapping.
  • Compile-time checks, including immutability and type system requirements.
  • Runtime optimizations, like constant arrays pre-initing and typed vectors.
  • KPHP has coroutines.
  • Support for PHP 7.4 features (PHP 8.0, 8.1 features already implemented and underway)
  • Translates 8 million lines of code in 50 seconds.

Other

Used for more than 10 years in a real project under high load.

@spekulatius
Copy link
Contributor

Nice, looks like a great addition!

README.md Outdated
### Virtual Machines
*Alternative PHP virtual machines.*
### Virtual Machines and Compilers
*Alternative PHP virtual machines and compilers to translate PHP into other programming languages.*

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... to translate PHP into other programming languages

Is this part necessary?

Maybe "Alternative PHP virtual machines and compilers" would suffice?

Not all compilers are source-to-source compilers.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you're right. I changed it to your suggestion.
Anyway, waiting for approval from @ziadoz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants