Any recovering PHP coders around? was Re: x=[:some_key] does not work?

E-mail me off list if you want to help me with something. It's
occurred to me that it would be very useful to create a simple guide
for the differences between Ruby and PHP syntax, but I don't remember
enough PHP to do it off the top of my head.

···

On 11/3/07, Joshua Muheim <forum@josh.ch> wrote:

Ups I'm sorry, I messed things up because PHP uses for both arrays
and hashes.

--
Giles Bowkett

Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com/

Giles Bowkett wrote:

Ups I'm sorry, I messed things up because PHP uses for both arrays
and hashes.

E-mail me off list if you want to help me with something. It's
occurred to me that it would be very useful to create a simple guide
for the differences between Ruby and PHP syntax, but I don't remember
enough PHP to do it off the top of my head.

Way, way back I started a section of the Rails wiki (http://wiki.rubyonrails.org/rails/pages/PHPEquivalents\) that was supposed to be a mirror of the PHP documentation structure so that people coming in from PHP would be able to easily figure out, through knowing the location of the relevant concept in the PHP documentation, what the Ruby equivalent is.

It never took off.

···

On 11/3/07, Joshua Muheim <forum@josh.ch> wrote:

--
Alex

>> Ups I'm sorry, I messed things up because PHP uses for both arrays
>> and hashes.
>
> E-mail me off list if you want to help me with something. It's
> occurred to me that it would be very useful to create a simple guide
> for the differences between Ruby and PHP syntax, but I don't remember
> enough PHP to do it off the top of my head.
>
Way, way back I started a section of the Rails wiki
(http://wiki.rubyonrails.org/rails/pages/PHPEquivalents\) that was
supposed to be a mirror of the PHP documentation structure so that
people coming in from PHP would be able to easily figure out, through
knowing the location of the relevant concept in the PHP documentation,
what the Ruby equivalent is.

It never took off.

The Rails wiki is a whole nother ball of wax. Let's not even go there.
The first edition of "The Ruby Way" had a cool set of appendices in
this vein, e.g., "From Perl To Ruby," "From Python To Ruby," etc., but
"From PHP To Ruby" is an idea whose time has really come.

···

--
Giles Bowkett

Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com/

Could be a trap. It may be tricky to keep it focused. Personally, I forgot almost all the PHP I knew. But learning Ruby worked better for me by not thinking about PHP at all.
That said, I always found that the Oreilly book PHP Cookbook was excellent even just from showing concepts for web development, and it might be a good source of bits and pieces that could be shown done in Ruby to illustrate how very different it would be.
The hardest thing will be the very non OOP nature of PHP compared with the very OOP nature of Ruby.
PHP does have a tacked on object model, but most PHP is still done like C/C++.

···

On Nov 4, 2007, at 3:53 PM, Giles Bowkett wrote:

Ups I'm sorry, I messed things up because PHP uses for both arrays
and hashes.

E-mail me off list if you want to help me with something. It's
occurred to me that it would be very useful to create a simple guide
for the differences between Ruby and PHP syntax, but I don't remember
enough PHP to do it off the top of my head.

Way, way back I started a section of the Rails wiki
(http://wiki.rubyonrails.org/rails/pages/PHPEquivalents\) that was
supposed to be a mirror of the PHP documentation structure so that
people coming in from PHP would be able to easily figure out, through
knowing the location of the relevant concept in the PHP documentation,
what the Ruby equivalent is.

It never took off.

The Rails wiki is a whole nother ball of wax. Let's not even go there.
The first edition of "The Ruby Way" had a cool set of appendices in
this vein, e.g., "From Perl To Ruby," "From Python To Ruby," etc., but
"From PHP To Ruby" is an idea whose time has really come.