 |
|
|
|
05-27-2010, 06:23 PM
|
Re: PHP vs. C++
|
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
|
Quote:
Originally Posted by holmessph
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?
|
Yep, I read about that recently, after one of our other members mentioned it. There's a couple other compilers written for PHP also, but they both compile to C instead of C++.
__________________
I build web things. I work for the startup Please login or register to view this content. Registration is FREE
.
|
|
|
|
05-27-2010, 06:25 PM
|
Re: PHP vs. C++
|
Posts: 3,081
Name: Michael Caine (look alike). *Sic semper tyrannis*
Location: Chelsea, England. Broke all 10 Commandments.
|
This is a question similar to one I've asked on another thread, but there seem to be experts here too.
I have a lot of old C++ code written under DOS, i.e. it wrote directly to a PC screen. Fortunately the screen I/O is contained in just one place in a library.
Can it be converted to run on the web? If so, is there a good place for me to learn how?
|
|
|
|
05-27-2010, 06:34 PM
|
Re: PHP vs. C++
|
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
|
I'd think that would be quite a project, as it would have to be converted to use CGI to output via a webserver. Maybe easy in the right hands, but I don't know enough about it to accurately estimate it.
__________________
I build web things. I work for the startup Please login or register to view this content. Registration is FREE
.
|
|
|
|
11-22-2011, 04:42 AM
|
Re: PHP vs. C++
|
Posts: 1
|
d whole topic s a crap.... could u compare pond nd ocean...... php cant even compared with C++.... which s a powerful general purpose programming language whereas php is just a scriptin lang which has d similar syntax of c .... nd its need to interpreted ie every line of d script need to be compiled... so time complexity ill enhanced in case of php......
|
|
|
|
11-22-2011, 08:39 AM
|
Re: PHP vs. C++
|
Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
|
Quote:
Originally Posted by raviloganathan
d whole topic s a crap.... could u compare pond nd ocean...... php cant even compared with C++.... which s a powerful general purpose programming language whereas php is just a scriptin lang which has d similar syntax of c .... nd its need to interpreted ie every line of d script need to be compiled... so time complexity ill enhanced in case of php......
|
Could we have that again please?
Only this time in English!!!!!!!!
__________________
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?
|
|
|
|
11-23-2011, 02:25 PM
|
Re: PHP vs. C++
|
Posts: 1
|
Hi,
Comparing PHP to C++ is somewhat none-sense, the languages are tottaly different and you may not be wondering wich one to choose!
It all depends on what you wanna do,if you wanna develope for the web then you should learn PHP, in other cases you rather go to C++ (or other language for example if you want to program iPhone apps then you need to learn Objective-C) so you need to determine what you are up to in the first place! 
|
|
|
|
11-27-2011, 11:34 AM
|
Re: PHP vs. C++
|
Posts: 920
Name: Scott Kaye
Location: Ontario
|
Comparing PHP to C++ is like comparing

with
One is far, far faster than the other. One if far, far more reliable than the other. One even looks cooler.
C++ is a compiled language, while PHP is an interpreted language. What this means is that C++ is really just 1's and 0's - binary, but PHP runs by exactly what you write.
C++ uses variable types, while PHP doesn't. A variable in PHP named '$variable' could house a string, a number (integer), a decimal, or a gigantic blob of text. C++ defines variable types, which, although giving newer programmers more of a headache, keeps everything very organized and strict. C++ allocates variables to memory (if my own memory serves me correctly), so it knows that an int value will be rather small, while other data types are bigger. Check out this tutorial, or even that entire website, for more knowledge.
|
|
|
|
11-27-2011, 03:44 PM
|
Re: PHP vs. C++
|
Posts: 195
Name: Jim
Location: Ohio
|
programmers with egos and big heads - never fun to work with
Create apps and have fun. Rules, oligarchs, and hierarchy my way is oppressive and people should enjoy what they do and worry less about what the powers that were say
Drinking the kool-aid that universities tell you what the big boys do is just that.
Learn C / C++ and be free from "King" corporate bondage
PHP is nice, because it is less of a learning curve, fast to code and deploy, open source, and allows you to extend it with C++
PHP and C++ are friends
Now corporate bondage is just that, you have to compile to that operating system and use their libraries.
Need I say more?
|
|
|
|
12-09-2011, 06:01 PM
|
Re: PHP vs. C++
|
Posts: 1
|
Hi, i ve read all the thread, really interesting. Ive recently finished a Pascal Course at the univerity and i learned and enjoyed it very much. Next semestre i gonna take modula-2 course there.
Now im looking forward to learn something usefull and which will provide me experience for the future but i dont know what to do yet and dont like to waste my time at all (well actually.. i do  ). I dont think (i dont trust me on it) i could learn C on internet whith the the knolage i have so far( after all, i have a whole semester course about C after i finish modula 2).
So, here comes my question.. Do you consider learning php is worth it? it provides me some experience for learning other languages in the future like C, java, etc? its somehow flexible or is too limited like someone said?
PD: im from uruguay and i dont master my english yet, as you may notice 
|
|
|
|
12-11-2011, 12:19 AM
|
Re: PHP vs. C++
|
Posts: 172
Name: James
Location: Australia
|
My solution....
...is to learn both. That way you would not be stuck with the wrong one.
__________________
** Directory of my other websites ***
Please login or register to view this content. Registration is FREE - for screen devices
Please login or register to view this content. Registration is FREE - for mobile devices
|
|
|
|
12-14-2011, 10:26 AM
|
Re: PHP vs. C++
|
Posts: 920
Name: Scott Kaye
Location: Ontario
|
Well, if you've already learned one language, it's not that difficult to move to the other, since they both share similar syntax.
Perl is also a language very similar to PHP, except it is better in every way.
|
|
|
|
12-14-2011, 10:35 PM
|
Re: PHP vs. C++
|
Posts: 366
Name: Steve
Location: Miami, FL, Earth
|
PHP is a Pinto.
C++ is a Formula 1 race car.
__________________
- Steve
President, Please login or register to view this content. Registration is FREE
|
|
|
|
12-15-2011, 03:47 PM
|
Re: PHP vs. C++
|
Posts: 10
|
What happen to usage. For what I been reading PHP has something to do with doing things with pages, sites, database or mostly web related things just like ASP and JAVA. ASM/C/C++ is mainly for writing programs like a calculator or something more. What PHP can do C++ cannot and visa-versa ... or am I'm missing something.
....
Now I'm reading page-1 of this thread and chrishirst already indicated this.
Last edited by max21b; 12-15-2011 at 03:54 PM..
|
|
|
|
12-15-2011, 04:51 PM
|
Re: PHP vs. C++
|
Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
|
Everything that PHP can do could be done with C or C++. The PHP interpreter is written in C.
PHP is a scripting language that run in the context of a webserver, as the PHP programmer you do not need to know how the interprocess communication works or is structured, whereas if you were writing a web application in C/C++ you would need to have the knowledge of how the communication is controlled or you would have to have a library to include in your app at compile time.
In PHP you don't need to know how the echo function works, in C/C++ you need to be able to code the echo function.
__________________
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?
|
|
|
|
|
« Reply to PHP vs. C++
|
|
|
| Thread Tools |
Search 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
HTML code is Off
|
|
|
|