News Feed

News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way
Confessions of a Converted PHP Developer On Visibility and Privates
May 12, 2011 @ 10:49:52

From there's a new post from a confessed developer who moved from PHP to Ruby about PHP's private visibility rules and how they compare to Ruby's.

Alright class - today I'm here to talk about the differences and similarities that PHP and Ruby have when it comes to object properties, methods, and their visibility - how you create variables inside classes, and how you can interact with them.

He compares the private properties in PHP classes to the corresponding handling in Ruby, including the getters and setters to go with them. There's also a look at class visibility settings in Ruby.

1 comment voice your opinion now!
visibility private protected public visibility ruby rubysource

blog comments powered by Disqus

Similar Posts HTML Helpers - Ruby Wannabes in PHP

Adam Bard: The Same App 4 Times: PHP vs Python vs Ruby vs Clojure PHP vs Ruby on Rails (Parts 1 & 2)

Ivo Jansch's Blog: Good use of public, private and protected in OO class design

PHPEverywhere: Is Ruby brainwashing us?

Community Events

Don't see your event here?
Let us know!

version package composer update laravel opinion library interview introduction tool framework security language podcast install community symfony voicesoftheelephpant release series

All content copyright, 2014 :: - Powered by the Solar PHP Framework