Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Kodbox: Open-source cloud desktop with multi-storage fusion and web IDE (github.com/kalcaddle)
31 points by indigodaddy 19 hours ago | hide | past | favorite | 4 comments




They readme suggests that it supports PHP back to 5.3. PHP 7.2 and 8.0 were huge compatibility leaps for the language. None of my 5.3 codebases would run on 8.1, which the readme also suggests, and none of my PHP 8 codebases would run on 5.3. This must be using such a small subset of the language that it would be difficult for a human to maintain it. Especially considering that no third party library would ever be able to run on those two versions.

I have some apps that works from 5.3 to 8.5. php has great compatibility, if you don't rely on external libraries or framework and don't use types.

For PHP 8.5 code to work with PHP 5.3 you'd have to forego short array syntax, finally blocks, scalar type hints and nullable types (OK, you mention this), the ?? operator, the ?-> operator, traits, and probably a million other things that we use every day.

For PHP 5.3 code to work on PHP 8+ you'd have had to completely forego error catching because that was completely upended in 7.0 or 7.2 (I forget which), not used short open tags, never used the class name as a constructor (that happened a lot in PHP 5), have no mcrypt functions, not used __autoload(), have had the foresight to use PDO instead of mysql_ (was PDO available in 5.3? I'd never seen it that early I think), you'd have had to be fortunate enough to not used ereg_, I think that older versions used # in ini file comments (I remember that breaking at some point, don't remember when), never used each(), not used safe_mode for mysql (strange because that was the default I think), and probably a million other issues that I hadn't encountered. If you have codebase written for PHP 5.3 that still works on modern PHP, I'd love to see it. I honestly don't believe such a codebase exists beyond the most trivial.


Most of the apps where developed for php 5.2-5.3 , as many things that you wrote where already bad code in this time. Spl autoloader, MySQLi, __construct was already available.

The apps are internal legacy apps so I can't share the codebase.

Because of this there was no big rewrite like types etc.




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

Search: