Join the discussion

Write your take first — we'll ask for email only when you're ready to publish.

  • Hacker News
  • > Along with the numbers, there were a handful of GitHub issues, including one where joining a path onto a URL with a trailing slash strips every letter “a” out of the path.
  • PHP did extensions and PECL modules wrong, due to its roots as a web server language. With managed hosting, often PHP doesn't offer what we might think of as basic functionality, since the admin didn't install/enable it. So it makes sense that these little one-off packages exist to route around snafus.

    It's still my favorite language though, since it comes closest to shell language but with C-style syntax (other than maybe Perl, which is a write-only language and hard to read, which unfortunately inspired Ruby to inherit some anti-patterns).

    I often dream about writing a modern hacker language that combines the best of everything like functional programming, higher-order methods, const by default, parallelism, sync blocking rather than async nonblocking concurrency, etc. It would also undo the pass-by-reference footguns added by PHP 5+ and return to the pass-by-value copy-on-write style of arrays. That's why I really can't endorse attempts like Hack which just introduce a new standard with its own problems.

    The insight being that LLMs work around the limitations of mainstream languages and frameworks, rather than challenging assumptions from first principles and building better foundations.

  • Should the repo be archived?

    I rarely see people use that feature yet tons of repos on Github are essentially dead.

  • For a package with that kind of install base, is there a final release that prints the migration options in a deprecation notice? People will find it years from now through old Stack Overflow answers.
  • We used to work together at AOL. Glad to see you on here; I hope you're doing great!
  • > Under a comment that reads // Workaround for trailing slashes, my code tacks an “a” onto the path so there’s always a last segment to cut off, then cuts it off with a find-and-replace. When the path ends in a slash, that last segment is just the “a”, and the find-and-replace takes every other “a” in the path with it.

    This is top-tier. left-pad levels of "we should just implement trivial functions in our own codebases"

    (I do not mean that as a knock on the author - it solved his use case just fine. Everyone who took a dependency on it afterward though...)

  • Author here, happy to answer any questions. I never imagined a polyfill for http_build_url would gain so much traction. After 12 years, deprecating it feels like the right move, especially given the new options from the community and PHP itself.
  • There is nothing as permanent as a temporary fix that works.

Explore Birbla archives

My temporary PHP fix from 2014 has nearly 20M installs. Today I'm deprecating it · Birbla