PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Wed Aug 12, 2020 1:30 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Sun Sep 25, 2016 10:05 pm 
Offline
Forum Newbie

Joined: Fri Sep 02, 2016 7:41 pm
Posts: 4
I don't know if this belongs in this section, I'm sorry if this should be in another subforum. Anyhow, I'm a C guy, and writing PHP is a struggle, because it requires such a huge shift in mentality. I don't really know what more to say. I'm going to look more into the reference and watch a few tutorials but damn, I'm so used to being given a small amount of tools in a library and using that to build bigger tools. Any advice or help?


Top
 Profile  
 
PostPosted: Mon Sep 26, 2016 12:21 am 
Offline
Forum Contributor

Joined: Wed Sep 25, 2013 4:09 am
Posts: 172
If it's any help there are tools for PHP too...

It took me 2 weeks to shift to PHP.
Sometimes I do get stuck and then I come here and the mods here are awesome!

I really like PHP now, I think its easy to model stuff fast using php/html...not so much code to get some visual results so atleast for me I get "feedback" faster from the code i make than in c and thats nice.

I started by doing a secure login (there is an excellent tutorial on the net for that) and when I was done with that I already gotten the feel for the language (that is if you dont just copy and paste the code :) but actually type it and try to figure out what you do).

Good luck :)

EDIT: Check AJAX, JQUERY for tools

http://www.wikihow.com/Create-a-Secure- ... -and-MySQL


Top
 Profile  
 
PostPosted: Mon Sep 26, 2016 11:32 am 
Offline
Site Administrator
User avatar

Joined: Wed Aug 25, 2004 7:54 pm
Posts: 13592
Location: New York, NY, US
I think a C/C++ mentality will server you well with PHP. Plus the languages are very similar. Some of the big things you will need to change in your head are:

- No pointers. There references, but they are rarely used. And you don't allocate and free memory (don't try -- it only makes things worse).

- Scripting languages use include/autoload instead of header files, make, compile

- PHP scripts are short lived programs, so you need to adjust to the reality of building everything up per request and not freeing anything

- Shared nothing takes a little getting used to. As short lived programs, you reload the context/session each request. Yes weird, but it can be beautiful.

- The fact that PHP is mainly a HTML/CSS/Javascript generator means those languages are just as important to you as PHP.

- You can use Composer for your "small amount of tools in a library and using that to build bigger tools" approach.

There are more I am missing, but hopefully that gives you some ideas.

_________________
(#10850)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 60 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group