PHP to Ruby
Convert PHP code into Ruby!
-
array_pop
Posted on July 17th, 2009 No commentsThe array_pop() function removes the element off the end of an array and returns it’s value.
PHP
$my_array = array('java', 'ruby', 'python', 'php'); echo array_pop($my_array); => // php
Ruby
my_array = ['java', 'ruby', 'python', 'php']; puts my_array.pop => # php
Leave a reply


