FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Learn PHP knowing C++
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Learn PHP knowing C++ [message #171702] Sun, 16 January 2011 21:35 Go to next message
Alexander is currently offline  Alexander   
Messages: 4
Registered: December 2006
Karma: 0
Junior Member
Hello. I know C++ well enough, and now I want to learn PHP. Is PHP
similar to C++ (not syntax, but concepts)? How difficult can it be?
Where should I start (after installing the server)? Thanks
Re: Learn PHP knowing C++ [message #171703 is a reply to message #171702] Sun, 16 January 2011 22:00 Go to previous messageGo to next message
Bernd Schulz is currently offline  Bernd Schulz
Messages: 10
Registered: September 2010
Karma: 0
Junior Member
Am 16.01.2011 22:35, schrieb Alexander:
> Hello. I know C++ well enough, and now I want to learn PHP. Is PHP
> similar to C++ (not syntax, but concepts)? How difficult can it be?
Yes.
Variables are more easy to use and no Memorymanagement.

> Where should I start (after installing the server)? Thanks
index.php:
<?PHP
echo "Hello world<br>";
?>

:-)
Re: Learn PHP knowing C++ [message #171704 is a reply to message #171702] Sun, 16 January 2011 22:14 Go to previous messageGo to next message
Captain Paralytic is currently offline  Captain Paralytic
Messages: 204
Registered: September 2010
Karma: 0
Senior Member
On Jan 16, 9:35 pm, Alexander <alva...@gmail.com> wrote:
> Hello. I know C++ well enough, and now I want to learn PHP. Is PHP
> similar to C++ (not syntax, but concepts)? How difficult can it be?
> Where should I start (after installing the server)? Thanks

I started here:

http://www.php.net/manual/en/getting-started.php

and just read the manual and tried things out until I understood them.
Re: Learn PHP knowing C++ [message #171706 is a reply to message #171703] Mon, 17 January 2011 03:23 Go to previous messageGo to next message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma: 0
Senior Member
Bernd Schulz wrote:
> Am 16.01.2011 22:35, schrieb Alexander:
>> Hello. I know C++ well enough, and now I want to learn PHP. Is PHP
>> similar to C++ (not syntax, but concepts)? How difficult can it be?
> Yes.
> Variables are more easy to use and no Memorymanagement.
Variables are harder to use because there is no typing that you can rely
on. Memory management is automatic so it will bite you one day.
Its interpreted so the order of things is important.

Variables are actually not declared, they are constructed.

>
>> Where should I start (after installing the server)? Thanks
> index.php:
> <?PHP
> echo "Hello world<br>";
> ?>
>

Juts pretend its C with $ in front of every variable till you get a
syntax error, then RTFM.


Read up the dot operator as well, and the way strings are handled and
their syntax: subtle differences.

> :-)
>
Re: Learn PHP knowing C++ [message #171707 is a reply to message #171706] Mon, 17 January 2011 09:19 Go to previous messageGo to next message
Tim Streater is currently offline  Tim Streater
Messages: 328
Registered: September 2010
Karma: 0
Senior Member
In article <ih0co7$6sv$1(at)news(dot)albasani(dot)net>,
The Natural Philosopher <tnp(at)invalid(dot)invalid> wrote:

> Bernd Schulz wrote:
>> Am 16.01.2011 22:35, schrieb Alexander:
>>> Hello. I know C++ well enough, and now I want to learn PHP. Is PHP
>>> similar to C++ (not syntax, but concepts)? How difficult can it be?

> on. Memory management is automatic so it will bite you one day.

In what way do you think memory management will bite you one day (apart
from the naive user, who, confronted with a 32kword IBM 7094, proceeded
to DIMENSION his FORTRAN array 1000x1000)?

--
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
Re: Learn PHP knowing C++ [message #171709 is a reply to message #171707] Mon, 17 January 2011 15:51 Go to previous messageGo to next message
Goran is currently offline  Goran
Messages: 38
Registered: January 2011
Karma: 0
Member
On 17.1.2011 10:19, Tim Streater wrote:
> In article <ih0co7$6sv$1(at)news(dot)albasani(dot)net>,
> The Natural Philosopher <tnp(at)invalid(dot)invalid> wrote:
>
>> Bernd Schulz wrote:
>>> Am 16.01.2011 22:35, schrieb Alexander:
>>>> Hello. I know C++ well enough, and now I want to learn PHP. Is PHP
>>>> similar to C++ (not syntax, but concepts)? How difficult can it be?
>
>> on. Memory management is automatic so it will bite you one day.
>
> In what way do you think memory management will bite you one day (apart
> from the naive user, who, confronted with a 32kword IBM 7094, proceeded
> to DIMENSION his FORTRAN array 1000x1000)?

Like the man said, it will strike you one day...
Re: Learn PHP knowing C++ [message #171721 is a reply to message #171709] Tue, 18 January 2011 16:03 Go to previous messageGo to next message
sheldonlg is currently offline  sheldonlg
Messages: 166
Registered: September 2010
Karma: 0
Senior Member
On 1/17/2011 10:51 AM, Goran wrote:
> On 17.1.2011 10:19, Tim Streater wrote:
>> In article<ih0co7$6sv$1(at)news(dot)albasani(dot)net>,
>> The Natural Philosopher<tnp(at)invalid(dot)invalid> wrote:
>>
>>> Bernd Schulz wrote:
>>>> Am 16.01.2011 22:35, schrieb Alexander:
>>>> > Hello. I know C++ well enough, and now I want to learn PHP. Is PHP
>>>> > similar to C++ (not syntax, but concepts)? How difficult can it be?
>>
>>> on. Memory management is automatic so it will bite you one day.
>>
>> In what way do you think memory management will bite you one day (apart
>> from the naive user, who, confronted with a 32kword IBM 7094, proceeded
>> to DIMENSION his FORTRAN array 1000x1000)?
>
> Like the man said, it will strike you one day...

that didn't answer Tim's (an now my) specific question.

--
Shelly
Re: Learn PHP knowing C++ [message #171886 is a reply to message #171704] Thu, 20 January 2011 09:07 Go to previous message
P E Schoen is currently offline  P E Schoen
Messages: 86
Registered: January 2011
Karma: 0
Member
"Captain Paralytic" wrote in message
news:28895f38-8064-4c3b-b5e5-4f54bc03da87(at)e4g2000vbg(dot)googlegroups(dot)com...

> I started here:

> http://www.php.net/manual/en/getting-started.php

> and just read the manual and tried things out until I understood them.

I'm just learning as well and I found this to be helpful:
http://www.freewebmasterhelp.com/tutorials/php

Paul
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: hackbar i ajax
Next Topic: SplFileObject returns an empty line at the end
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 02:02:06 GMT 2024

Total time taken to generate the page: 0.02935 seconds