ramsey,
@ramsey@phpc.social avatar

I’m really excited about this PECL package I’ve been working on. I’ve been learning a lot about C programming and PHP internals.

Thanks to all who have helped! @remi @mlocati @derickr @nielsdos

https://pecl.php.net/package/ecma_intl

mlocati,

@ramsey @remi @derickr @nielsdos I've just added support to ecma_intl to https://github.com/mlocati/docker-php-extension-installer (which means that people can install it in docker containers with just one line: install-php-extensions ecma_intl)

ramsey,
@ramsey@phpc.social avatar

@mlocati @remi @derickr @nielsdos Awesome! Thanks!

mlocati,

@ramsey May I ask you to drop me a note once the stability changes (eg from alpha to beta/stable)? That way I can update these lines: https://github.com/mlocati/docker-php-extension-installer/blob/2.1.49/install-php-extensions#L2720-L2722

ramsey,
@ramsey@phpc.social avatar

@mlocati I can try to remember to do that. :-)

I don’t have a timeline right now for that. My goal is to implement most of the ECMA-402 API before moving into beta, but once it gets to beta, stable shouldn’t be too far behind.

ramsey,
@ramsey@phpc.social avatar

@remi @mlocati @derickr @nielsdos I wish I could turn this into a Twitch stream, but I don’t think I’d be very enjoyable to watch. My general development method is a lot of “fuck around and find out.”

Njames,

@ramsey @remi @mlocati @derickr @nielsdos

I think that is my general approach to development too

I am sure you are now a C guru!

chucker,
@chucker@norden.social avatar

@ramsey @remi @mlocati @derickr @nielsdos

:drakeno: FIFO data structures
:drakeyes: FAFO development method

pierstoval,
@pierstoval@mastodon.social avatar

@ramsey I'm curious about the reason that made you create this extension, and why you preferred this instead of using PHP's native Intl extension? Is it to bring more standards to the PHP ecosystem?

ramsey,
@ramsey@phpc.social avatar

@pierstoval The short answer is that I wanted a project I could start from scratch to help learn PHP internals and C.

The long answer is: While leading efforts to internationalize and localize our applications at $dayJob. We were using FormatJS, but there wasn’t a comparable library in PHP, so I started building FormatPHP, but I encountered a number of limitations with the native Intl extension.

1/n

ramsey,
@ramsey@phpc.social avatar

@pierstoval I found that FormatJS mostly provides polyfills for ECMA-402, so FormatPHP started looking a lot like an ECMA-402 port to PHP.

The more I looked at ECMA-402, the more I wanted a similar API to work with in PHP. So, ecma_intl isn’t just about fixing the limitations of ext-intl or providing the missing functionality, it’s about bringing that API to PHP.

So, in a sense it is about bringing more standards to PHP, but that wasn’t really the motivating factor.

2/2

ramsey,
@ramsey@phpc.social avatar

@pierstoval This is the FormatPHP library I mentioned: https://github.com/skillshare/formatphp

pierstoval,
@pierstoval@mastodon.social avatar

@ramsey That's a really interesting vision, I hope you succeed in this port!

derrabus,
@derrabus@phpc.social avatar

@ramsey How does that extension relate to the Intl extension that is bundled with PHP?

ramsey,
@ramsey@phpc.social avatar

@derrabus It’s not related. This extension is an attempt to port the ECMA-402 specification to PHP. Both the bundled extension and this one are based on ICU.

derrabus,
@derrabus@phpc.social avatar

@ramsey So, similar feature set, but with a standardized interface? Anyway, sounds like a fun pet project for learning how to build php extensions. 🙂

ramsey,
@ramsey@phpc.social avatar

@derrabus Exactly. There’s a little more info here: https://phpc.social/@ramsey/110979327231059765

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • magazineikmin
  • ethstaker
  • InstantRegret
  • tacticalgear
  • rosin
  • love
  • Youngstown
  • slotface
  • ngwrru68w68
  • kavyap
  • cubers
  • thenastyranch
  • mdbf
  • megavids
  • cisconetworking
  • GTA5RPClips
  • modclub
  • khanakhh
  • everett
  • Leos
  • osvaldo12
  • normalnudes
  • tester
  • Durango
  • anitta
  • provamag3
  • JUstTest
  • All magazines