Stuck using PHP at work. Redpill me on it and tell me why I should be learning Java instead.
What should I learn next
Java is shit, stick with php
Inb4 gohipsters
Php is shit. Large php programs get complex because the language doesn't enforce anything. Shitty programmers who worked on the code usually hacked shit in that way down the line becomes a huge headache.
This. I get tired of doing empty and isset checks
You should probably do some actual refactoiing instead of adding to the problem.
Gigantic old code base. Refactoring will not be worth the return so I do what I can
You can produce spaghetti shitcode just as easily with Java, except it's going to be even less transparent than PHP. The only valid reason would be if you want to make more cash as Java tends to pay more.
Which framework?
Javascript. It has every appeal for a retard
>The only valid reason [to learn Java] would be if you want to make more cash
this
trust me Java is not worth it, unless you only give a shit about making money.
Seriously, it's the only language I actively hate, and over the time I spent using various languages, Java seemed to be the only one that was objectively bad, and should be replaced by another language, no matter the task at hand.
Money is primary reason I want to learn it.
As for framework, don't ask. Its a CMS, second most popular after WP
What would you rather then?
>Java seemed to be the only one that was objectively bad, and should be replaced by another language, no matter the task at hand.
from what little I've used it, that's exactly how i felt about it. seems like it's supposed to be this "jack of all trades, master of none" kinda language, but all that means is that it's never the best tool for any job.
C# is an analogue of Java and is generally accepted as an improvement over Java.
$projectname = isset($_POST['projectname']) ? $_POST['projectname'] : "";
$companyname = isset($_POST['companyname']) ? $_POST['companyname'] : "";
$name = isset($_POST['name']) ? $_POST['name'] : "";
$phone = isset($_POST['phone']) ? $_POST['phone'] : "";
$email = isset($_POST['email']) ? $_POST['email'] : "";
$billaddress = isset($_POST['billaddress']) ? $_POST['billaddress'] : "";
$billcity = isset($_POST['billcity']) ? $_POST['billcity'] : "";
$billstate = isset($_POST['billstate']) ? $_POST['billstate'] : "";
$billzip = isset($_POST['billzip']) ? $_POST['billzip'] : "";
$billcountry = isset($_POST['billcountry']) ? $_POST['billcountry'] : "";
$shipaddress = isset($_POST['shipaddress']) ? $_POST['shipaddress'] : "";
$shipcity = isset($_POST['shipcity']) ? $_POST['shipcity'] : "";
$shipstate = isset($_POST['shipstate']) ? $_POST['shipstate'] : "";
$shipzip = isset($_POST['shipzip']) ? $_POST['shipzip'] : "";
$shipcountry = isset($_POST['shipcountry']) ? $_POST['shipcountry'] : "";
$installaddress = isset($_POST['installaddress']) ? $_POST['installaddress'] : "";
$installcity = isset($_POST['installcity']) ? $_POST['installcity'] : "";
$installstate = isset($_POST['installstate']) ? $_POST['installstate'] : "";
$installzip = isset($_POST['installzip']) ? $_POST['installzip'] : "";
$installcountry = isset($_POST['installcountry']) ? $_POST['installcountry'] : "";
$design = isset($_POST['design']) ? $_POST['design'] : "";
$surfaceorientation = isset($_POST['surfaceorientation']) ? $_POST['surfaceorientation'] : "";
$surfacetype = isset($_POST['surfacetype']) ? $_POST['surfacetype'] : "";
mad bro?
>Which framework?
Since its PHP and legacy, likely to be some framework made from scratch.
There is literally nothing wrong with php as long as projects follows modern standards and api instead of being bunch of hacked together scripts that kept on a support since php4 era.
You can use input validation libraries.
Niggerlicious.
PHP has a default latitude and longitude if you don't change those in php.ini. If you look up the default coordinates you will find that they point to a place just outside of Jerusalem where in ancient times the entrance to hell was located.
Don't take my word for it, check it out yourselves.
Fuck, it's real. Explains a lot really.
>THERE'S A LIBRARY FOR THAT
>JUST DOWNLOAD AND INCLUDE IT BRO
>BLOAT WON'T HURT
go fuck yourself javascript faggot
Because repeating isset billion times isn't bloat.
WHAT IN THE FUCKING SHIT I THOUGHT YOU WERE MEMEING
lighter than including a fucking library is, dumbfuck
Yeah, the Zend Engine was built by (((them))). Check it out.
If you really think using a lib for input validation is what's going to make your program slow you should go back to writing your FizzBuzz.
Java sucks dick but it's the best way to get an easy job. If you want a hobby use kotlin instead.
Regex find: \$(\w+) = isset\(\$_POST\['\1'\]\) \? \$_POST\['\1'\] : "";
Replace: $$$1 = $$_POST['$1'] ?? "";
Result:
$projectname = $_POST['projectname'] ?? "";
$companyname = $_POST['companyname'] ?? "";
$name = $_POST['name'] ?? "";
$phone = $_POST['phone'] ?? "";
$email = $_POST['email'] ?? "";
Or if you want to be fired:
foreach (['projectname', 'companyname', 'name'] as $var) {
$$var = $_POST[$var] ?? "";
}