Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
avstuff3347y<?php does not need to be at the top of a php file. It only needs to precede any PHP.
Allowing for an unfortunate mix markup and logic.
My current gripe about WordPress. Haven't tried converting an entire WP theme to a templating language like Pug yet but I am in the process of building one from a starter theme built on it. -
bolovsky1137ySounds like you caught some poorly developed scripts. PHP allows this, but só do other languages.
Some advices: dont use MAMP, use a vm/docker/wtvr, because you will not deploy and serve files on osx
Check out some php coding standards. This should show you that a large part of the php community actually wants people to develop clean
Check some PHP framework (eg symfony, Laravel, phalcon) to see the code structure there.
Hope it helps :) -
mamp is not php so use better tools, as for the php foreach loop I think it makes perfect sense since you want it to loop over each item and this item should be known AS in the loop.
-
Kimmax112477y@bolovsky
index 688e8a2..a786bb8 100644
--- a/rant/comment/bolovsky.txt
+++ a/rant/comment/bolovsky.txt
@@ -5,0 +5,0
-docker
+lcx
# For the love of good -
Look up docker, learn php7, get familiar with composer and psr4 autoloading. PHP done right will feel more like Java but less verbose. Also use an IDE, phpstorm is a de-facto standard for a reason making the arrow operator your least problem. Use phpunit and/or codeception for tests. And look into the symfony components, symfony2 / silex really had a great impact on the community.
I have good knowledge frontend/backend web development but i didnt know php cause i heard so much shit about it. I finally made up my mind to learn it.
I fucking hate php
>>> MAMP doesnt fucking work when i installed it
>>> After it finally works, I change the sql password. WHY THE FUCK DO I NEED TO GO TO LIKE 10 FILES AND CHANGE THE GODDAMN PASSWORD IN EACH ONE.
>>> php doesnt work if the <?php tag isnt at the top -> this shit wasnt even mentioned
>>> why the fuck would you use '->' for everything when a simple '.' would suffice.
>>> useless class system (more like a pseudo class system)
>>> foreach ($list as $item) dafuq that is not even correct english, what is wrong in "foreach ($item in $list)"
i hate php
undefined