I wasn't talking about the underscore ;-)

ThisIsASampleSentenceCanYouReadIt?

this_is_a_sample_sentence_can_you_read_it?

Ruby is about readability, and the second one is much easier to read than the first. And that's why Ruby uses underscores.
PHP mixes underscores with camelcase in function names. strpos() str_replace(): hard to remember.

Compare:
Code:
string = "this is a string"
string.include? "string"
string['string'] = "new string"
With:
Code:
$string = "this is a string";
strpos($string, 'string') !== false;
str_replace("string", "new string", $string);
I have to remember:
1. base string for strpos is the first argument
2. base string for str_replace is the last argument
3. not str_pos, but strpos and not strreplace, but str_replace

This is much easier in Ruby. Replacing a part of a string is similar to replacing part of an array. Checking if a string contains another string is similar to do such a check on an array:

Code:
countries = ['england', 'united states', 'canada']
countries.include? 'england'
countries[1] = 'holland'
Ruby's variable naming:
Code:
local_variable = 4
Constant = 4
@instance_variable = 4
@@class_variable = 4
PHP
Code:
$localVariable = 4; // there is no global standard, so $local_variable is ok too
define('Constant', 4); // function to set constant, eek
$this->instance_variable = 4; // php uses $this. Ruby doesn't mix methods with properies: everything is a method for the outside world.
// php doesn't have class variables?
But you can use pascal/camelcasing if you want:

Code:
@instanceVariable
This is what I originally meant:

Code:
public $has_many = "notes";
vs
Code:
has_many :notes
and

Code:
public $belongs_to = array(
"assoc1" => array("foreign_key"=> "weird_key"),
"assoc2" => null,
"assoc3" => array("conditions" => "age > 25"),
);
vs
Code:
belongs_to :assoc1, :foreign_key => 'weird_key'
belongs_to :assoc2
belongs_to :assoc3, :conditions => 'age > 25'
Rails is much cleaner: you're adding associations, you're not setting class/instance variables.

Ruby is almost always shorter and more readable.

Translate this into PHP:

Code:
b = true
list = ('aa'..'zz').select{b = !b}
List is an array of two strings:
Code:
ab
ad
af
..
zz
Who can do that in less than 7 lines in php? And in less than 15 lines in java?
(1 thing per line, not:
Code:
$b = true; $arr  = array(); $str = 'aa'; while($str != 'zz') { $arr[] = $str; $str++; $str++; }
)