Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
PHP Programming

PHP 7.3 Brings C Inlining and Speed Improvements (techrepublic.com) 36

An anonymous reader quotes TechRepublic: PHP 7.3, the newest update to the widespread server-side web development language, was released on Thursday, bringing with it a handful of new features, modernizations, and modest speed improvements.... The largest improvements in 7.3 include support for Foreign Function Interface (FFI), allowing programmers to write inline C code inside PHP scripts. Though this feature does not presently provide the same level of performance as native PHP code, it can under certain circumstances be used to reduce the memory footprint of a given task.

PHP 7.3 also includes flexible heredoc and nowdoc syntax, now no longer requiring closing markers to be followed by a semicolon or new line. The feature proposal for this notes that the previous rigid requirements "caused them to be, in-part, eschewed by developers because their usage in code can look ugly and harm readability...." PHP 7.3 does bring some backward incompatible changes and deprecated functions. The use of case-insensitive constraints is now deprecated, as is the use of case-insensitive constants with a case that differs from the declaration.

Phoronix reports that PHP 7.3 is nearly 10% faster than version 7.2, while it's 31% faster than PHP 7.0 and nearly three times faster than PHP 5.6.
This discussion has been archived. No new comments can be posted.

PHP 7.3 Brings C Inlining and Speed Improvements

Comments Filter:
  • by grubert ( 95988 ) on Saturday December 08, 2018 @02:20PM (#57771552) Homepage

    Used to come here a lot ten years ago, and I know it's not as "popular" as it used to be, but it seems like the smartest people stayed. Really enjoying the commentary.

    • by Anonymous Coward

      I don't expect much intelligence in this thread. Queue the PHP haters armed with tales of C injection.

      • Re: (Score:2, Interesting)

        by Anonymous Coward

        That's not the danger. The danger is allowing C object code to run that wasn't compiled BY that system. I'm not sure who asked for it, but it's certainly a way to destroy any sandboxing the php software setup for the scripting. This is as stupid as WASM in javascript.

        The second you allow code to run unvetted, because it's been compiled a certain way, you open the hardware up to every single exploit that would be available had an idiot user just ran a random malware binary. Fortunately most PHP systems are l

    • Seems like they're handing out more mod points to old timers these days...which is why I'm AC right now.
      Could have something to do with it?
  • Developer quality (Score:4, Insightful)

    by iTrawl ( 4142459 ) on Saturday December 08, 2018 @05:42PM (#57772374)

    Yes! C code in PHP code. It's all ever wanted.

    Yep, giving the power of C to people who can't code PHP properly to begin with. Best idea ever.

    • The "issue" with PHP is that it is dirt easy to get going, supported by hosting providers, and so both cost of entry and knowledge needed are minimal. And there is a lot of crap tutorial and demo code out there to be found and copy/pasted

      Think the biggest challenge for anyone who wants to learn good PHP today is that there have been lots of changes and improvements (PDO/mysqli vs. mysql for example) but there are a TON of old tutorials, copy/paste code examples, etc. out there that are full of code that wa

  • by Qbertino ( 265505 ) <moiraNO@SPAMmodparlor.com> on Saturday December 08, 2018 @07:31PM (#57772710)

    I don't like PHP all that much but it pays my bills and gets the job done. Say what you want but it's the only domain specific language in widespread use that has a proven record of delivering. I also like the document driven approach. PHP doesn't memory leak, it simply timeouts. Most of the time that is. A simpleton can program and add some logic to his documents within minutes and it's powerful enough to build large applications that work as advertised.
    I will be sticking with PHP as a main PL for the time being and PHP 7.3 once again looks like a promising and useful update.

    My 2 eurocents.

    • I had an ISP gigs a decade ago...supposedly to fix their servers, or so they said. It seems also their customer provision app was pretty much brain damaged.
      In no time to learn PHP properly, and doing yet another expected role in the project, I just designed the web pages in some graphical too in my Mac, and wrote all the web frontend for Apache and backend in C+MySQL.
      It worked pretty well, and it was fast, and it has been working until now.
      Ironically, I can pretty much migrate that system without worry
  • Foreign Function Interface (FFI), allowing programmers to write inline C code inside PHP scripts.

    It's not FFI that allows to write inline code. With an FFI, you can access foreign object code. So which one is it? Does it have an FFI, or inline foreign code?

He has not acquired a fortune; the fortune has acquired him. -- Bion

Working...