Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 05-11-2010, 11:10 AM PHP vs. C++
Experienced Talker

Posts: 33
Trades: 0
What makes one the better option than the other in certain scenarios?

What can you do with PHP that you couldn't in C++ and vice versa?

The reason I ask is I am contemplating which of these two languages to commit my time to learning but could use an elementary breakdown of pro's and con's of each from people that know and understand both.

Any input would be greatly appreciated.

Thanks!
Frank Drebin is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-11-2010, 11:12 AM Re: PHP vs. C++
Experienced Talker

Posts: 33
Trades: 0
Oh and in general, which of these 2 languages is regarded as the more difficult one?
Frank Drebin is offline
Reply With Quote
View Public Profile
 
Old 05-11-2010, 11:15 AM Re: PHP vs. C++
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
PHP > C++ Nothing


C++ > PHP Just about everything.

You are comparing Chalk and Cheese.

PHP is a scripting language designed for creating web applications.

C++ is a real programming language.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 05-11-2010, 11:20 AM Re: PHP vs. C++
Experienced Talker

Posts: 33
Trades: 0
Ok, so what is C++ used for the most? Creating software? Is C++ capable of creating web apps?
Frank Drebin is offline
Reply With Quote
View Public Profile
 
Old 05-11-2010, 12:26 PM Re: PHP vs. C++
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Yep, C++ is for creating software (Windows is written in C/C++)


C++ can create web apps BUT they need to be written to run in a web server context which is somewhat different from console or GUI apps.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 05-11-2010, 06:26 PM Re: PHP vs. C++
nayes84's Avatar
Extreme Talker

Latest Blog Post:
Difference between ASP And JSP
Posts: 232
Name: John
Location: Tokyo
Trades: 0
Also if come to speed. c/c++ is much more faster than php because the fact c/c++ is compiled language while php is interpreted language.

Which mean c/c++ program is first converted into machine language (binary code) then get loaded into memory and run directly. While on the other hand php program is just a file written in php code which need php interpreter to run. php interpreter read the script file and interpret and run it line by line which take longer time than running binary code in the case of c/c++ program.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

if(I'm("Helpful")) Add_Talkupation("nayes84");
nayes84 is offline
Reply With Quote
View Public Profile
 
Old 05-13-2010, 04:39 AM Re: PHP vs. C++
Junior Talker

Posts: 4
Name: jedc53
Trades: 0
PHP is a computer scripting language originally designed for producing dynamic web pages.C++ is a general-purpose programming language.Ajax will be used in PHP.OOP in C++ can be a bit confusing at first since you don't encapsulate the methods in the class like PHP.
__________________

Please login or register to view this content. Registration is FREE
jedc53 is offline
Reply With Quote
View Public Profile
 
Old 05-13-2010, 05:18 AM Re: PHP vs. C++
nayes84's Avatar
Extreme Talker

Latest Blog Post:
Difference between ASP And JSP
Posts: 232
Name: John
Location: Tokyo
Trades: 0
Quote:
Originally Posted by jedc53 View Post
PHP is a computer scripting language originally designed for producing dynamic web pages.C++ is a general-purpose programming language.Ajax will be used in PHP.OOP in C++ can be a bit confusing at first since you don't encapsulate the methods in the class like PHP.
not correct because both php and c++ are object oriented languages.
php code can be object oriented or function oriented or can be without functions at all. while c++ code can be either function oriented or object oriented.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

if(I'm("Helpful")) Add_Talkupation("nayes84");

Last edited by nayes84; 05-13-2010 at 11:15 AM..
nayes84 is offline
Reply With Quote
View Public Profile
 
Old 05-13-2010, 06:28 AM Re: PHP vs. C++
wayfarer07's Avatar
Poo on You

Latest Blog Post:
Introducing WowWindow
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
Trades: 0
Quote:
Originally Posted by chrishirst View Post
PHP > C++ Nothing


C++ > PHP Just about everything.

You are comparing Chalk and Cheese.

PHP is a scripting language designed for creating web applications.

C++ is a real programming language.
Not 100% true. PHP has an implementation known as Roadsend that allows it to be compiled into native binary: http://code.roadsend.com/pcc There's also another compiler called PHC: http://www.phpcompiler.org/

PHP can be used to create rich user interfaces in a desktop application. The most popular method for doing this is with PHP-GTK: http://gtk.php.net/ It is supposed to be possible to get these applications to compile with Roadsend I believe. There's also another UI library built on QT, called, oddly enough, PHP-QT: http://www.php-qt.org/
__________________
I build web things. I work for the startup
Please login or register to view this content. Registration is FREE
.
wayfarer07 is online now
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 05-13-2010, 07:11 AM Re: PHP vs. C++
Novice Talker

Posts: 6
Name: lisa
Trades: 0
C++ is a helpful language.
dressupgames8 is offline
Reply With Quote
View Public Profile
 
Old 05-13-2010, 07:47 AM Re: PHP vs. C++
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
Originally Posted by wayfarer07 View Post
Not 100% true. PHP has an implementation known as Roadsend that allows it to be compiled into native binary: http://code.roadsend.com/pcc There's also another compiler called PHC: http://www.phpcompiler.org/

PHP can be used to create rich user interfaces in a desktop application. The most popular method for doing this is with PHP-GTK: http://gtk.php.net/ It is supposed to be possible to get these applications to compile with Roadsend I believe. There's also another UI library built on QT, called, oddly enough, PHP-QT: http://www.php-qt.org/
Nice, so PHP is growing up I wonder if it will give some serious competition to the dotnet framework
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 05-14-2010, 06:56 AM Re: PHP vs. C++
c69
c69's Avatar
Experienced Talker

Posts: 40
Name: Constantine
Trades: 0
Rofl at whole topic Its like comparing bb-gun to 200mm howitzer.
c69 is offline
Reply With Quote
View Public Profile Visit c69's homepage!
 
Old 05-14-2010, 09:25 AM Re: PHP vs. C++
NullPointer's Avatar
Will Code for Food

Posts: 2,815
Name: Matt
Location: Irvine, CA
Trades: 0
Quote:
Originally Posted by c69 View Post
Rofl at whole topic Its like comparing bb-gun to 200mm howitzer.
The question is which is which. Obviously in terms of performance C++ comes out on top. There are a lot of other factors however, where PHP comes out on top such as portability and coding time.

It isn't always the case that you need code that runs as fast as possible. Sometime you just need something that will work and can be deployed quickly.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is online now
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 05-14-2010, 03:37 PM Re: PHP vs. C++
Experienced Talker

Posts: 33
Trades: 0
Quote:
Originally Posted by dressupgames8 View Post
C++ is a helpful language.

What do you mean by that?
Frank Drebin is offline
Reply With Quote
View Public Profile
 
Old 05-23-2010, 08:37 AM Re: PHP vs. C++
C0ldf1re's Avatar
Banned (by the Yankees)

Posts: 3,081
Name: Michael Caine (look alike). *Sic semper tyrannis*
Location: Chelsea, England. Broke all 10 Commandments.
Trades: 0
Quote:
Originally Posted by dressupgames8 View Post
C++ is a helpful language.
He is joking. It is a sick joke and should not be allowed.
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
C0ldf1re is offline
Reply With Quote
View Public Profile
 
Old 05-24-2010, 12:55 AM Re: PHP vs. C++
Novice Talker

Posts: 5
Name: Bilal Tahir
Trades: 0
Quote:
Rofl at whole topic Its like comparing bb-gun to 200mm howitzer.
I am afraid thats quite different. The portability and flexibility of adjusting other material such as scripting as well as MarkUp languages in PHP gives it an edge over C++ for office network based softweres and applications. You can easily embed, insert and retrieve any thing with PHP. Your Network Control is multiplied. Moreover you are far away from the complexity of C++ coding.
In My opinion the simily must be rephrased with some suitable words not to hurt the dignity of ever growing PHP.
cbtahir2001 is offline
Reply With Quote
View Public Profile
 
Old 05-24-2010, 03:27 AM Re: PHP vs. C++
C0ldf1re's Avatar
Banned (by the Yankees)

Posts: 3,081
Name: Michael Caine (look alike). *Sic semper tyrannis*
Location: Chelsea, England. Broke all 10 Commandments.
Trades: 0
So you mean that PHP is quick and easy to use, compared to C++ which can be more awkward. Like the ease of use of a BB-gun, compared to the clumsiness of a 200mm howitzer?
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
C0ldf1re is offline
Reply With Quote
View Public Profile
 
Old 05-25-2010, 12:19 PM Re: PHP vs. C++
Extreme Talker

Posts: 149
Trades: 0
I`m learning C++ at school, so it really helped me learn PHP at home, because they are very similar. Still, I`m going with PHP because I`m more interested in web
__________________
Free
Please login or register to view this content. Registration is FREE

Visit our
Please login or register to view this content. Registration is FREE
and
Please login or register to view this content. Registration is FREE
mimamo is offline
Reply With Quote
View Public Profile
 
Old 05-25-2010, 04:41 PM Re: PHP vs. C++
Sleeping Troll's Avatar
Ultra Talker

Posts: 351
Name: Butch Begy
Trades: 0
One really big difference is that php is an interpreted language... that is, the code is read and interpreted then executed on a line by line basis, where as C++ is a compiled language... that is it is compiled into machine language and executed directly by the processor. By the way they are both OOPS coding structure, learn one well and the others come easily... well, relatively easy.
__________________
Sleeping Troll, EMUSE, Mind Expansion...Truly serendipity!

Last edited by Sleeping Troll; 05-25-2010 at 04:43 PM..
Sleeping Troll is offline
Reply With Quote
View Public Profile
 
Old 05-27-2010, 04:19 PM Re: PHP vs. C++
Average Talker

Posts: 20
Trades: 0
Actually, Facebook is running C++ on every single one of their web servers now.

They write everything in PHP then they have an app they created which you can download (they open sourced it) and it compiles the PHP code into C++ binaries.

It's call HipHop for PHP.. It's a neat utility, they claim it took their server resources down to 50% of what they were.. Awesome huh?
__________________

Please login or register to view this content. Registration is FREE
- Awesome Price, Awesome Support, Awesomely Awesome...


Please login or register to view this content. Registration is FREE
- Web Development, E-Commerce, SEO, SMM, CMS's
holmessph is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to PHP vs. C++

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.57610 seconds with 12 queries