LegacySystems
Post #7501, on Dec 1, 2025 in TG
Massive PHP File with 19000+ Lines and a Breakpoint at the Abyss
Description
A close-up photograph of a code editor screen showing a PHP file with alarming line numbers. Visible are lines 6060-6061 showing a 'private function' ending with a closing brace, then a jump to line 19515 where a red breakpoint dot is set, followed by lines 19516-19521. Line 19517 shows a doc comment '/** * we dont use th...' (truncated), line 19519 shows the closing '**/', and line 19520 shows another 'private function $schedule...'. The file is at least 19,521 lines long, contains functions documented as 'we dont use this', and the developer has set a breakpoint deep in the abyss. This represents the horror of massive legacy PHP files that have grown beyond any reasonable maintenance threshold
Use J and K for navigation
Comments
19Comment deleted
When your file has more lines than your company has customers, but nobody dares refactor it because last time someone tried, they were never seen again
context window flex red flag on next interview 🌚 Comment deleted
Context window is dead here Comment deleted
Probably just 13000 lines of if-else statements. To be fair, If I were an LLM, I would kill myself if I had to parse this amount of bullshit. So it works, I guess 😂 Comment deleted
There was 20000-lines function in code at one of my previous jobs. This function worked with bank cash process (and yes it was PL|SQL). Guy who could understand that stuff (THE Guy) was really immortal in bank. Some of authors (of these rows) were already dead by the moment, when i tried to understand this function. But! But. After two days i started understand what was going on there. After week i had a courage to create changes in this ... mmm... structure. Comment deleted
I worked on a code base with two files exceeding 65k lines. They were cpp files for a single h file. The problem was, the compiler couldn't handle file larger than a specific number which was, I think, 65536 lines. And because they still exceeded it you needed defines for different customers so only specific parts get compiled in the first place. All in all the defines.h was like 4k lines long Comment deleted
the worst part, that was my first job after vocational job training Comment deleted
PL/SQL was published in 1995. It's not COBOL level of necromancy. Comment deleted
For me it is a bit underrated:) I think, it is quite good for even heavy logic of business processes. Comment deleted
That's a beauty of Pascal. The ugliness is Pascal also🙃 Comment deleted
The amazing part, the Pascal and Delphi community is alive an kicking, and there are surprisingly many apps written in it, you can even write mobile apps in it cross platform(!) Comment deleted
that one is returning from grave ... for the 2nd time Comment deleted
I have the theory that this is basically because it is a functional equivalent of c/c++/c# all in one language. And also because c/c++ syntax for working with pointers, pass-by-reference, object and etc - sucks since the beginning and it only have gotten worse (I mean a mess of &, *, **, ->). In Delphi it all is solved so you retain all the power but syntax is clean and understandable Comment deleted
Pl/sql is relative to Ada not Pascal Comment deleted
Ada is descendant of Pascal soooo Comment deleted
and python/ruby are descendants of ada, that explains why I despise both languages :D Comment deleted
in what sense? lol Comment deleted
Ruby is ok as it is. It's the Rails that are shit. Comment deleted
Ok Comment deleted