Announcement

Collapse
No announcement yet.

PHP 7.4's FFI Support Is In Good Shape For Tapping C Functions / Structures From PHP

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • uid313
    replied
    Originally posted by Calinou View Post

    The main thing that keeps me around PHP these days are the frameworks. To my knowledge, we don't really have equivalents of Symfony or Laravel in languages like Go or Rust. Most Web frameworks in compiled languages seem to be closer to microframeworks than full-fledged frameworks, which requires reinventing the wheel a fair bit if you work on anything that's not trivial. Sure, you can cobble libraries together, but you don't get a cohesive result in the end. This can make it more difficult for new contributors to enter the codebase, which is especially important for open source projects.
    Yeah and PHP is really easy to do web development in too. I code in Python and Kotlin too, but would have no idea how to make a website in those environments.

    I really like C# with .NET Core, which is open source and cross-platform so it works on Linux. It has the ASP.NET Core framework which support the MVC pattern as well as other patterns such as Razor pages. You can use it to make websites or restful web APIs. It does request routing, model binding, model validation, logging, dependency injection, and user management, it have Entity Framework Core as ORM for persistence.

    Leave a comment:


  • Calinou
    replied
    Originally posted by uid313 View Post

    Yeah, I really like that PHP nowadays have PHP-FIG with PSR specifications, package manager (Composer), and a type system where you can declare the return type, method arguments, etc. It has gotten lots better since I used it.

    Yeah, I like static typed languages too, I use C#. Also some Kotlin (which is a bit weird to me, and I mainly like it because it is not Java). But also use languages that are not typed such as Python and JavaScript (sometimes I use TypeScript though).
    The main thing that keeps me around PHP these days are the frameworks. To my knowledge, we don't really have equivalents of Symfony or Laravel in languages like Go or Rust. Most Web frameworks in compiled languages seem to be closer to microframeworks than full-fledged frameworks, which requires reinventing the wheel a fair bit if you work on anything that's not trivial. Sure, you can cobble libraries together, but you don't get a cohesive result in the end. This can make it more difficult for new contributors to enter the codebase, which is especially important for open source projects.

    Leave a comment:


  • MrEcho
    replied
    I think PHP has a nice mix of statically typed functions and parms, and not having it forced on you. With PHP 7.4 / 8 where going to have 'typed' everything, but its still up to you if you want to use it.

    Leave a comment:


  • uid313
    replied
    Originally posted by cen1 View Post

    For MVC style apps it is pretty good. Although nowadays I prefer statically typed languages.
    Yeah, I really like that PHP nowadays have PHP-FIG with PSR specifications, package manager (Composer), and a type system where you can declare the return type, method arguments, etc. It has gotten lots better since I used it.

    Yeah, I like static typed languages too, I use C#. Also some Kotlin (which is a bit weird to me, and I mainly like it because it is not Java). But also use languages that are not typed such as Python and JavaScript (sometimes I use TypeScript though).

    Leave a comment:


  • cen1
    replied
    Originally posted by uid313 View Post
    I haven't coded PHP in years, because nowadays I mostly use other languages, but reading up on all the changes and massive improvements to the language is interesting. I think the language have evolved greatly, and it makes me kind of miss it. It has gotten so much better since I last used it.
    For MVC style apps it is pretty good. Although nowadays I prefer statically typed languages.

    Leave a comment:


  • uid313
    replied
    I haven't coded PHP in years, because nowadays I mostly use other languages, but reading up on all the changes and massive improvements to the language is interesting. I think the language have evolved greatly, and it makes me kind of miss it. It has gotten so much better since I last used it.

    Leave a comment:


  • PHP 7.4's FFI Support Is In Good Shape For Tapping C Functions / Structures From PHP

    Phoronix: PHP 7.4's FFI Support Is In Good Shape For Tapping C Functions / Structures From PHP

    One of the interesting features for PHP 7.4 that is due for release at the end of next month is the long-awaited FFI (Foreign Function Interface) support. PHP 7.4's FFI lets developers call functions / variables / data structures defined in the C programming language from native PHP code...

    http://www.phoronix.com/scan.php?pag...FFI-Good-Shape
Working...
X