Convert Pattern Portfolio to PHP