GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 12-Oct-2006, 04:10
infocalc5 infocalc5 is offline
New Member
 
Join Date: Oct 2006
Posts: 2
infocalc5 is on a distinguished road

main difference between c/c++ and php


so, which is that? i saw many things that are almost the same with php... i guess the reason is that php is kinda webc++..

thanx in advance.
  #2  
Old 12-Oct-2006, 15:36
ubergeek ubergeek is offline
Awaiting Email Confirmation
 
Join Date: Jan 2005
Posts: 775
ubergeek is a jewel in the roughubergeek is a jewel in the roughubergeek is a jewel in the rough

Re: main difference between c/c++ and php


Two big differences come to mind right away:
1. compilation -- C++ code needs to be compiled into a .exe, PHP is interpreted directly from the source by Apache.
2. types -- C++ is strongly typed, PHP has no variable types (well, there are types, but a variable can change types throughout the program). Functions don't need specific return types, parameters don't need types either.

Variables in PHP have to start with $. There are some differences associated with classes and especially polymorphism and inheritance.

But you are right; the syntax and concepts are very similar. PHP is much more forgiving than C++ in some ways (with variable types and such).
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Get the date / time difference with PHP admin PHP Code Library 5 26-Oct-2010 09:51
Help ! I need help starting up on Php ! onauc MySQL / PHP Forum 11 04-Jan-2005 23:57
uisng php to display php dopee MySQL / PHP Forum 6 14-May-2004 18:40
php software dopee MySQL / PHP Forum 0 04-May-2004 11:26
All the big PHP script collections that matter jrobbio MySQL / PHP Forum 5 06-Jun-2003 16:14

Network Sites: GIDNetwork · GIDApp · GIDBlog · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 21:19.


vBulletin, Copyright © 2000 - 2014, Jelsoft Enterprises Ltd.