|
|
|
|
|
by anamoulous
3410 days ago
|
|
If you embrace what PHP is good at, which to me is fast, easy to understand code that is dispatched once per web request in a shared nothing state, PHP is great. When you have to deal with PEAA style PHP, things start to go off the rails in both speed and simplicity. I happen to like PHP's standard lib: it's big and addresses a lot of needs in building web apps. But you don't really see tons of new high quality bindings or libraries being introduced at the rate that, say, Go is getting them. If someone told me I had to build a product from scratch in PHP, I would probably start here: https://github.com/exflickr/flamework/blob/master/docs/philo... |
|
While true, this is an apples to oranges comparison. Go libraries, bindings, and extensions are written in Go. PHP bindings and extensions are written in C.
Writing a language extension or library binding in PHP requires an understanding of PHP internals and the C language. Compared to writing a binding or library in Go, this is difficult. It requires the knowledge of 2 languages (instead of 1) and an understanding of how PHP works "under the hood".
However, I think that Zephyr shows promise. It's a high-level language designed for creating PHP extensions, without a direct understanding of PHP internals or C being required. https://zephir-lang.com/ (I just wish it didn't limit you to OO design/implementation.)