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.
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.
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.
Way, way back I started a section of the Rails wiki
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.
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++.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.