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-27-2010, 06:23 PM 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 holmessph View Post
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
.
wayfarer07 is online now
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
 
Register now for full access!
Old 05-27-2010, 06:25 PM 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
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?
__________________

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-27-2010, 06:34 PM 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
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
.
wayfarer07 is online now
Reply With Quote
View Public Profile Visit wayfarer07's homepage!
 
Old 11-22-2011, 04:42 AM Re: PHP vs. C++
Junior Talker

Posts: 1
Trades: 0
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......
raviloganathan is offline
Reply With Quote
View Public Profile
 
Old 11-22-2011, 08:39 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 raviloganathan View Post
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?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-23-2011, 02:25 PM Re: PHP vs. C++
Junior Talker

Posts: 1
Trades: 0
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!
AbsoluteO is offline
Reply With Quote
View Public Profile
 
Old 11-27-2011, 11:34 AM Re: PHP vs. C++
Physicsguy's Avatar
404 - Title not found

Posts: 920
Name: Scott Kaye
Location: Ontario
Trades: 0
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.
__________________
Check out my
Please login or register to view this content. Registration is FREE
or my
Please login or register to view this content. Registration is FREE
!
Physicsguy is offline
Reply With Quote
View Public Profile
 
Old 11-27-2011, 03:44 PM Re: PHP vs. C++
jim1228's Avatar
Extreme Talker

Posts: 195
Name: Jim
Location: Ohio
Trades: 0
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?
jim1228 is offline
Reply With Quote
View Public Profile Visit jim1228's homepage!
 
Old 11-27-2011, 03:53 PM Re: PHP vs. C++
jim1228's Avatar
Extreme Talker

Posts: 195
Name: Jim
Location: Ohio
Trades: 0
you will find out how limited PHP is when you get to working with file uploads

I had to go right to C

http://www.php.net/manual/en/internals2.ze1.zendapi.php
jim1228 is offline
Reply With Quote
View Public Profile Visit jim1228's homepage!
 
Old 12-09-2011, 06:01 PM Re: PHP vs. C++
Junior Talker

Posts: 1
Trades: 0
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
squiel91 is offline
Reply With Quote
View Public Profile
 
Old 12-11-2011, 12:19 AM Re: PHP vs. C++
Extreme Talker

Posts: 172
Name: James
Location: Australia
Trades: 0
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
TRANZIT JIM is offline
Reply With Quote
View Public Profile Visit TRANZIT JIM's homepage!
 
Old 12-14-2011, 10:26 AM Re: PHP vs. C++
Physicsguy's Avatar
404 - Title not found

Posts: 920
Name: Scott Kaye
Location: Ontario
Trades: 0
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.
__________________
Check out my
Please login or register to view this content. Registration is FREE
or my
Please login or register to view this content. Registration is FREE
!
Physicsguy is offline
Reply With Quote
View Public Profile
 
Old 12-14-2011, 10:35 PM Re: PHP vs. C++
Ultra Talker

Posts: 366
Name: Steve
Location: Miami, FL, Earth
Trades: 0
PHP is a Pinto.

C++ is a Formula 1 race car.
__________________
- Steve

President,
Please login or register to view this content. Registration is FREE
smoseley is offline
Reply With Quote
View Public Profile Visit smoseley's homepage!
 
Old 12-15-2011, 03:47 PM Re: PHP vs. C++
Novice Talker

Posts: 10
Trades: 0
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..
max21b is offline
Reply With Quote
View Public Profile
 
Old 12-15-2011, 04:51 PM Re: PHP vs. C++
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
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?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
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 1.70946 seconds with 11 queries