optional. this is function php for change exist layer style in geoserver v2.3.0.

    function change_layer_style($url_layer,$style_name) {
    	$params = '<layer><defaultStyle><name>'.$style_name.'</name></defaultStyle><enabled>true</enabled></layer>';
    	$ch = curl_init();
    	curl_setopt($ch, CURLOPT_URL,$url_layer);
    	curl_setopt($ch, CURLOPT_HTTPHEADER, Array("Content-Type: text/xml"));
    	curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
    	curl_setopt($ch, CURLOPT_USERPWD,"user:password"); //geoserver.
    	curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
    	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);	// Receive server response ...
    
    
    	$response = curl_exec($ch);
    
    	curl_close ($ch);
    	return $response;
        

    }

    //--> how to use.
 

       //--> 1. config your geoserver url.
        $your_workspace = "xxx";
        $your_layer_name = = "bbb";
    
        $url_layer = "http://xxxx.co.uk:8080/geoserver/rest/layers/".$your_workspace.":".$your_layer_name;
        $style_name ="your_exist_style_name";
    
        //--> call above function.
        change_layer_style($url_layer,$style_name);