I have to say it reminds me more of perl than PHP. Granted, PHP reminds me of perl, but not in the same way (more C'ish than perl IMO).
I wouldn't buy a book honestly. Ruby never did seem to make the big hit like it hype had suggested it would at least in the web world, but if you have the extra time I'd look into some sites that specialize in ruby. You can never go wrong with learning a new language thats for sure.
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php