Go Back   WarriorForum - Internet Marketing Forums > Warrior Support Forums > Programming Talk
Register Blogs FAQ Social Groups CalendarHelp Desk

Reply
 
Share
LinkBack Thread Tools
Old 05-03-2012, 03:03 AM   #51
Warrior Member
 
Join Date: May 2012
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: PHP or C++ ???

php is hypertext preprocessor language.it is a server side html embedded scripting language mainly build to t provides web developers with a full suite of tools for building dynamic websites whereas c++ is mainly used for buliding desktop applications.
shellydisuja is offline   Reply With Quote
Old 05-03-2012, 07:32 AM   #52
HyperActive Warrior
 
Join Date: Dec 2011
Location: Unknown
Posts: 162
Thanks: 28
Thanked 12 Times in 9 Posts
Contact Info
Send a message via Skype™ to Dead Body
Default Re: PHP or C++ ???

There is not lot more difference in C++ and PHP both have almost same syntax... please try to learn programming not Programming Language.. If you learn C++ you just need to learn the sytax of PHP..

Dead Body is offline   Reply With Quote
Old 10-16-2012, 08:59 PM   #53
Warrior Member
 
Join Date: Sep 2011
Posts: 14
Thanks: 2
Thanked 0 Times in 0 Posts
Default Re: PHP or C++ ???

The fact that PHP is more popular, C + + is a great language, use what you like best !
raferti is offline   Reply With Quote
Old 10-17-2012, 01:52 AM   #54
Active Warrior
 
seowonder56's Avatar
 
Join Date: Jun 2012
Posts: 40
Thanks: 0
Thanked 4 Times in 4 Posts
Default Re: PHP or C++ ???

Both are totally different generally c++ and vc++ both are for the windows application development and php is for web development so i dont think its good to compare both of them
seowonder56 is offline   Reply With Quote
Old 10-18-2012, 06:26 AM   #55
Warrior Member
 
Join Date: Oct 2012
Location: miami
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: PHP or C++ ???

PHP focuses mainly on web and C++ is for desktop application so you decide what you want to do?
pipercraig is offline   Reply With Quote
Old 10-18-2012, 08:06 PM   #56
Warrior Member
 
Join Date: Apr 2006
Location: , , USA.
Posts: 17
Thanks: 0
Thanked 1 Time in 1 Post
Contact Info
Send a message via AIM to dutrowllc
Default Re: PHP or C++ ???

You shouldn't program in C++ unless you are writing code for the Arduino or a laser guided missile.

You will spend a lot of your time debugging stupid stuff that you shouldn't have to think about in C++.

You are better off with Python and Javascript. PHP is ok, but the trend is moving away from that and more towards Python. You can program server-side in Javascript using NodeJS.
dutrowllc is offline   Reply With Quote
Old 10-18-2012, 08:31 PM   #57
Advanced Warrior
 
Join Date: Aug 2012
Posts: 511
Thanks: 0
Thanked 29 Times in 27 Posts
Default Re: PHP or C++ ???

I know that c++ is such a language by which all types of works can be done. But PHP is more easy for web app.

kazim is offline   Reply With Quote
Old 10-19-2012, 04:46 AM   #58
Warrior Member
 
Join Date: Oct 2012
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: PHP or C++ ???

PHP is probably the most popular programming language on the web. Used to improve the website. With PHP, you can do things like create username and password pages, check details of a form, create forums, photo galleries, polls, and more. If you come across a website that ends in PHP, then the author has written some programming code to encourage plain, old HTML.

Nicholasamarquez is offline   Reply With Quote
Old 10-21-2012, 07:40 PM   #59
The Unbreakable Warrior
War Room Member
 
Join Date: May 2010
Posts: 91
Blog Entries: 2
Thanks: 7
Thanked 6 Times in 6 Posts
Lightbulb Re: PHP or C++ ???

There is a lot of confusion here. Both C++ and PHP are just programming languages. Both can be used to program everything on every operating system. C++ is Objected Oriented prograrmming language, strong-typed, this means you must declare any variable or object used by the program. PHP is also an objected oriented programming language but soft-typed it does not require variable declaration as with C/C++. As a matter fact PHP has the same structure as C++. In other words, PHP is sort of a clone of C.

Normally, the C/C++ language is compiled. These compilers are designed to generate machine code which instructions would be executed directly by the CPU. These type of programs are widely used to optimize time consuming tasks such as compressing data, device drivers, web servers, but not limited to just that. Therefore, programming on C++ requires certain skill because you have total control of the program memory and you have to check boundaries and memory addresses.

Is it possible creating web applications with C/C++?

Sure, it is possible just, think of this: the webserver where your page is hosted was probably programmed with C/C++.

On the other hand, PHP is commonly an interpreted language, this means, the PHP parser executes the script and translates it on to server commands, it does not generate machine code or executable file to run the program. For this the server must have installed the PHP extension to run PHP scripts. With PHP you do not have to worry about memory boundaries or heap management. However, PHP scripts are a slower than C/C++ compiled files because the server must interpret each code line of the script while the C compiled program is directly sent to the CPU.

Is it possible creating desktop applications with PHP?

YES. How? Well there are tools that compile the PHP script into machine code. As it should be tools capable of interpreting C++ code as a server side script. However, never heard of one so far.

So which is better? A: BOTH but depends the application

To create simple web applications such as shopping carts, content management systems, or simple database management, I would go for PHP. You only need a webhosting with PHP enabled to use it.

To create advanced optimized applications such a search engine (like Google), 3D rendering machine I would go for C++. They can run on servers if you have such privilege of installing on them.

Can I merge both?
Yes, you can write an extension for PHP with C++ to later use it into your PHP scripts.

So what to learn first?
I defnitely would go for C/C++ first. Once you have learned C/C++, PHP would be a piece of cake. Personal experience of this.

As a matter fact for your information the PHP library used to run PHP scripts was built with C.

I hope you this helps to give you the idea.
nikomaster is offline   Reply With Quote
Old 10-22-2012, 01:59 AM   #60
Active Warrior
 
Join Date: Oct 2012
Posts: 98
Thanks: 5
Thanked 0 Times in 0 Posts
Default Re: PHP or C++ ???

Quote:
Originally Posted by strangerstudios View Post
PHP is built specifically to serve HTML to a browser. It became popular because it worked very well, was easy to pickup, and had excellent documentation early on. It's a very "scrappy" language focused on getting things done.

While you could technically write a website in C++, it would be like trying to fit a square peg into a round hole.

To be asking this question, I'm assuming you are new to building websites.

If you want to build a general purpose website as fast as possible, I would recommend looking into a system like WordPress, a "Content Management System" which runs on top of PHP and makes building websites very easy. You can tweak the PHP yourself via plugins if you need to.

If you are gun hoe about making a "web app", I would look to learn PHP on a lower level or look into Ruby, Ruby on Rails, Python, etc.

If you are in a corporate environment, consider Java.

If you are familiar with Windows development and .NET, you can checkout C# and their web development tools which are related to C++.
Yes, I fully agree with you and thank you for your post.
dexlink is offline   Reply With Quote
Old 10-22-2012, 12:36 PM   #61
Banned
 
Join Date: Dec 2010
Posts: 898
Thanks: 16
Thanked 67 Times in 66 Posts
Default Re: PHP or C++ ???

Both are different similarity they are both object oriented ,
PHP is better for web development and c++ is better for device level programming.
rising_sun is offline   Reply With Quote
Old 10-22-2012, 09:54 PM   #62
Warrior Member
 
mehdi7604's Avatar
 
Join Date: Oct 2012
Location: Sherbrooke, QC
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Social Networking View Member's FaceBook Profile 
Default Re: PHP or C++ ???

C++,
i saw lots of responses like that :
PHP : Web apps
C++ : Desktop Apps

Yes you can use C++ to generate web pages, but why you want to make your life impossible, you have PHP and lots of frameworks ???

If you still want to use C++, and you worry about the design, use MVC, so you can focus on each part of your application.
mehdi7604 is offline   Reply With Quote
Old 10-23-2012, 11:55 PM   #63
Web Developer
 
muddywaters's Avatar
 
Join Date: Oct 2012
Location: Richmond CA
Posts: 50
Thanks: 1
Thanked 3 Times in 3 Posts
Default Re: PHP or C++ ???

Give PHP a shot, it should work for you and save you time.
muddywaters is offline   Reply With Quote
Reply

  WarriorForum - Internet Marketing Forums > Warrior Support Forums > Programming Talk

Bookmarks

Tags
php

Thread Tools

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



All times are GMT -6. The time now is 12:14 AM.