X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=misc.php;h=b18abd43b9f62aeeebf3cac3a7408705aa3af1c4;hb=3faf64c6a1e0cbd4f880da951775c41fb8a6f0ab;hp=1737a86839efcd239f0a879be3ae1c2d087e6704;hpb=856f805c6cbb6e712c662214f3b5821442f808a0;p=wfpl.git diff --git a/misc.php b/misc.php index 1737a86..b18abd4 100644 --- a/misc.php +++ b/misc.php @@ -67,15 +67,12 @@ function exec_pipe($command, $stdin) { } - - - - function unix_newlines($str) { $str = str_replace("\r\n", "\n", $str); return str_replace("\r", "\n", $str); } + # return current year (all 4 digits) function this_year() { return strftime('%Y'); @@ -129,4 +126,8 @@ function ref(&$foo) { return new stupid_reference($foo); } +function &last(&$array) { + if(count($array)) return $array[count($array) - 1]; +} + ?>