<?php

$str = '<link rel="shortcut icon" href="http://localhost/teste/icon1.png">
<link rel="shortcut icon" href="http://localhost/teste/icon2.png">
<link rel="shortcut icon" href="http://localhost/teste/icon3.png">
<link rel="shortcut icon" href="http://localhost/teste/icon4.png">';

preg_match_all( '/<link\s*(\w+=".*?")>/', $str, $matches );

function transpose( $array ) {
	
    array_unshift( $array, null );
    
    return call_user_func_array( 'array_map', $array );
}

$matches = array_map(

    function( $current ) {

        $attributes = preg_split(
        	
        	'/\s*(\w+)="(.*?)\s*"/',
        	
        	$current, NULL, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE
        );

        $transposed = transpose( array_chunk( $attributes, 2 ) );

        return array_combine( $transposed[ 0 ], $transposed[ 1 ] );
    },

    $matches[ 1 ]
);

var_dump( $matches );