I understand ruby (on rails) uses plenty of "miracle", however i use PHP, can there be absolutely no way of applying the rails-like:

class Player < ActiveRecord::Base
    has_many :cards
end

in PHP it might make a lot of peoples lives a lot simpler. Exist possibly frameworks/ORM's that offer similar functionality etc?

in CakePHP there are relationships for example hasMany, belongsTo, hasOne, and hasAndBelongsToMany

The word you are searching for is definitely an "Object Relational Mapper" (ORM). The main one you cite is an element from the Rails framework, known as ActiveRecord.

PHP ActiveRecord is a project that tries to provide this, although the last release is at This summer 2010. I've not really tried on the extender I simply switched to Rails. :)

PHP does not possess a ORM alone, but you will find several fairly functional ORM projects for this I am familiar with Propel, and it is rather good (used e.g. within the Symfony framework, which resembles Ruby somewhat).