Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Just ignore the fugly standard library inconsistencies of (old) PHP, every language has their toilet corner...

Personally, I do like the way the standard library is - almost all cases of where people whine about it being inconsistent, it is a consequence of the PHP standard library and many of its extensions being extremely thin wrappers around libc and C/C++ libraries in general.

That, in turn, makes it often possible to just take straight C library example code, copy it into a PHP file, add a $ in front of all variables, and have it magically work.

(IMHO, it's no surprise that the whiners tend to be younger programmers who have grown up with Java in their university education - us older "neckbeards" are so used to the C world that its conventions are second nature for us)



>> That, in turn, makes it often possible to just take straight C library example code, copy it into a PHP file, add a $ in front of all variables, and have it magically work.

* head explodes awesome

I know what I'm doing this afternoon!


Writing PHP bindings is pretty easy as well (once you manage to sort out build tooling, but that's a mess anywhere in C). Have fun :)




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: