3 ms·
So how do you work around the problems where, for example. (Simplest, quickest example I could thing of.) PHP = strtoupper($str) Ruby = "Hello".upcase Since
by rurounijones 14y ago
So how do you work around the problems where, for example. (Simplest, quickest example I could thing of.)
PHP = strtoupper($str)
Ruby = "Hello".upcase
Since Ruby is a method on the string object and PHP takes the string as an argument. To make them the same you would need to do either
PHP = upcase($str)
Ruby = "Hello".upcase
In which case you lose context in PHP or
PHP = strtoupper($str)
Ruby = "Hello".strtoupper
In which case you are repeating yourself in ruby.