Index: /htdocs/wordpresstrunk/wp-admin/includes/upgrade.php
===================================================================
--- /htdocs/wordpresstrunk/wp-admin/includes/upgrade.php	(revision 11823)
+++ /htdocs/wordpresstrunk/wp-admin/includes/upgrade.php	(working copy)
@@ -75,7 +76,7 @@
 	$wp_rewrite->flush_rules();
 
 	wp_new_blog_notification($blog_title, $guessurl, $user_id, $random_password);
-
+	wp_check_php_version();
 	wp_cache_flush();
 
 	return array('url' => $guessurl, 'user_id' => $user_id, 'password' => $random_password, 'password_message' => $message);
@@ -268,6 +269,7 @@
 		return;
 
 	wp_check_mysql_version();
+	wp_check_php_version();
 	wp_cache_flush();
 	make_db_current_silent();
 	upgrade_all();
@@ -1656,4 +1658,23 @@
 	}
 }
 
+	 /**
+ * Checks if the current version of PHP is below the nag level and adds usermeta to use to display a notice if it is
+ *
+ * @since ???
+ * @see php_below_min_nag() for the nag message displayed and php_below_min_nag_handler() for the function that stops display of the nag message
+ *
+ */
+function wp_check_php_version(){
+	global $wp_php_min_version;
+	global $wpdb;
+	if (version_compare(PHP_VERSION, $wp_php_min_version, '<')) {
+		$users = $wpdb->get_results("SELECT ID from $wpdb->users");
+		foreach ( (array) $users as $a_user ) {
+			$user = new WP_User($a_user->ID);
+			if ( $user->has_cap('install_plugins') )
+				update_usermeta($a_user->ID,'php_below_min_nag','true');
+		}
+	}
+}
 ?>


Index: /htdocs/wordpresstrunk/wp-includes/version.php
===================================================================
--- /htdocs/wordpresstrunk/wp-includes/version.php	(revision 11823)
+++ /htdocs/wordpresstrunk/wp-includes/version.php	(working copy)
@@ -30,3 +30,11 @@
  * @global string $manifest_version
  */
 $manifest_version = '20090616';
+
+/**
+ * Holds PHP min version to not nagged
+ *
+ * @global string $manifest_version
+ */
+$wp_php_min_version = '5.0.0';
+

Index: /htdocs/wordpresstrunk/wp-admin/includes/user.php
===================================================================
--- /htdocs/wordpresstrunk/wp-admin/includes/user.php	(revision 11823)
+++ /htdocs/wordpresstrunk/wp-admin/includes/user.php	(working copy)
@@ -838,6 +838,44 @@
 }
 
 /**
+ * If the phpversion is below the min, display a nag until it goes away
+ *
+ * @since 2.9.0
+ * @see wp_check_php_version() for the function that adds the nag on install and php_below_min_nag_handler() for the function that stops display of the nag message
+ *
+ */
+
+add_action('admin_notices', 'php_below_min_nag');
+function php_below_min_nag() {
+	global $user_ID;
+	if ( ! get_usermeta($user_ID, 'php_below_min_nag') )
+		return;
+
+	echo '<div class="error php_below_min_nag"><p>';
+	printf(__("Notice: Your Webserver is currently using PHP version 4, which is no longer recieving security updates and will no longer be supported by WordPress in an upcoming version<br />
+			  <a href='%1$s'>Learn more about this issue</a> | <a href='%2$s' id='php_below_min_nag-no'>I understand the issue and want you to stop informing me</a>"), 'http://codex.wordpress.org/Switching_to_PHP5', '?php_below_min_nag=0');
+	echo '</p></div>';
+}
+
+/**
+ * Checks if the current version of PHP is below the nag level and adds usermeta to use to display a notice if it is
+ *
+ * @since 2.9.0
+ * @see php_below_min_nag() for the nag message displayed and wp_check_php_version() for the function that adds the nag on install/upgrade
+ *
+ */
+add_action('admin_init', 'php_below_min_nag_handler');
+function php_below_min_nag_handler() {
+	global $user_ID;
+	if ( ! get_usermeta($user_ID, 'php_below_min_nag') ) //Short circuit it.
+		return;
+
+	if  (isset($_GET['php_below_min_nag']) && '0' == $_GET['php_below_min_nag'])
+		delete_usermeta($user_ID, 'php_below_min_nag', 'true');
+
+}
+
+/**
  * Setup the default contact methods
  *
  * @access private

