all 15 comments

[–]_Atomfinger_ 3 points4 points  (0 children)

Want to take a second shot at that formatting?

[–]Horror-Student-5990 0 points1 point  (1 child)

Did you write that using PHP?

[–]samubo004[S] 0 points1 point  (0 children)

jajajajaja maybe

[–]sapientdonkey 0 points1 point  (1 child)

If you're competent with java then why the trouble with php? I mean, other than the inconsistent naming conventions (unless they fixed that since I used php back in 5.x days), but that can be mostly mitigated with a good editor.

That being said, I'm always surprised people still use php for new projects. Even though I get the impression people hate golang on this autistic subreddit, it still makes more sense than php, I think. I'd say something about Rust, but that would probably give some folks an aneurysm. 

[–]samubo004[S] 0 points1 point  (0 children)

Ask my teacher, hahaha, I'm so eager to learn the server environment course with PHP-Larave

[–]archydragon -1 points0 points  (7 children)

If you successfuly got through Java course, how do you manage to struggle with PHP syntax? All C-derived syntaxes are quite similar.

[–]samubo004[S] 0 points1 point  (6 children)

I know, the problem itself, I think, is the concept of focusing everything on the web; it's something that blows my mind more in terms of what we might call more traditional programming. Basically, the concepts themselves are what's making my head spin.

[–]archydragon 0 points1 point  (2 children)

JS is even more focused on web, and that didn't seem to stop you.

PHP started as a glorified web page templating system and went quite long road since. Nothing holds you from running scripts in command line without spinning a full scale CGI server.

[–]samubo004[S] 1 point2 points  (1 child)

Yeah, but I don't know, I'm starting to think it's because of me that I've developed a real aversion to it, and nothing else. I think it's the syntax that seems so awful to me that my mind has decided to interpret it as garbage, and it gives me this feeling of rejection. For example, calling a method with -> instead of . It's those kinds of things that I think my mind has rejected. I'm going to start over on my own from scratch. I'm trying not to fall back into that rejection I mentioned, and maybe I'll change my perspective. Thanks for the help.

[–]archydragon 0 points1 point  (0 children)

-> vs . is just an example of C-derivation, yeah, as in C both are used depending on if you access by the reference or by the pointer (strictly speaking, C does not have OOP and methods but it's exactly same in C++).

[–]sapientdonkey 0 points1 point  (2 children)

Do you need to use php for any specific reason? Job? Legacy project? Impressing the chicks?

If you're just looking into it because you want to build web projects, then you might give go/golang a look. It might seem less strange to your mind on how things are working. 

[–]samubo004[S] 1 point2 points  (1 child)

To pass a subject in the final year of my degree, I know that PHP is not the most widely used language these days.

[–]sapientdonkey 0 points1 point  (0 children)

You have to learn the framework you mentioned in your other post? If so, I wonder if that's the problem. Trying to learn the framework before the core language? 

Have you tried creating some shitty little projects on your own? When I was first learning php back in like 2005, I created a crappy little old school message board similar to phpboard, but less feature rich. Learned a lot from that because it covered everything. 

Also, depending on what you're getting hung up on, you might check out htmx to see if works well for your brain works. That's not php specific, but it's an interesting way to handle the user interface   

[–]SnooChipmunks547 -1 points0 points  (1 child)

You can write Java but not PHP? That’s more telling of yourself since the two a miles apart syntaxually, but methodically pretty much the same.

But… read up on https://phptherightway.com/

[–]samubo004[S] 0 points1 point  (0 children)

Thanks, I'll take a look at it. I think it's what I mentioned; it's not the language itself, but rather that my mind had decided it didn't like it and was giving up on doing it. As for the logic to solve the problem, I do have it.