Tag Archives: PHP

5 Useful PHP to Ruby methods

When I first started writing in ruby I found myself needing to know the ruby method equivalents to specific PHP functions. These methods are widely used by myself for debugging and day to day checking of data types.

PHP’s die(‘message’) becomes

1
abort 'message'

PHP’s get_class_methods() becomes

1
object.methods.inspect

PHP’s in_array() becomes

1
array.include? 'item'

Continue reading