Christoffer Kjølbæk I have a blog, therefore I am…

18Jul/100

PHP function to get current SVN ID

Make a function like the below in you PHP file

function get_rev() {
	return (int)substr(substr('$Rev: 168 $', 6), 0, -2);
}

And add the Revision keyword to the properties of the file

svn propset svn:keywords Revision your_file.php

"$Rev: 168 $" will then automatically be updated on every commit.