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
-
johnDoe32338yFuck I had the same sort of issue once. Spent 3 hours trying to get a basic PHP pie chart to print as an image by reading data from a mySQL database to generate the chart.
The image simply would not print, was nearly ready to punch a hole in my monitor.... Apparently having a blank line at the top of the pages first <?PHP tag makes your program do stupid things, or just not work at all. Netbeans IDE was of no help solving this one. -
tahnik389918y@kalpitjain @Muppens It was quite a long time ago when I was doing uni projects on php and mysql. Later I've used phpstorm for my personal projects :)
-
zshh38538yKids, don't code in an IDE/editor that doesn't help you with stuff like this.
Good thing you've started using PhpStorm now 😄 -
I never understand why people have problems with things like missing semicolons or dots instead of commas. Just look in the fucking error log.
-
garrettw2698y@codeclod oh, ok. FYI, mysqli is no longer a best practice - currently the best option is PDO. @tahnik
-
@garrettw I've worked with prepared statements, makes sense. I've not used PHP regularly for 6 years
-
garrettw2698y@codeclod I see your profile says java, perl, and python.. so out of curiosity, what language do you primarily use now?
-
@garrettw primarily Java. Second, python, and I'm inheriting a giant project written in C/C++.
-
@garrettw it was one of the first languages I learned to use in a production environment (for work), as we did a lot of text processing. PHP bears a resemblance to it. We're moving away from it in favor of python but I will always default to it if I need a quick and dirty script to do something.
-
garrettw2698y@codeclod yeah, I feel like it might be easy to pick up due to the PHP resemblance. I also really like that its regex patterns are primitives. But I've always thought its keyword "my" was strange.
-
It's not required, but it's strongly recommended (use strict enforces it) as a way to prevent variable scope creep and promote explicit declaration. It's a little quirky compared to other languages for sure.
Related Rants
For a flipping two hours the code wasn't working. Then I saw this single dot instead of comma...
NOOOOOOOOOOOOOOOOOOOOOOO
undefined
mysql
php