- var_dump: documentation ( source)
- array_combine: documentation ( source)
- preg_match_all: documentation ( source)
<?php
$str = <<< EOB
/** preloader colors **/
@preloader_bg: #0081ff;
@preloader_color: #fff;
/** layout **/
@body_bg_image_position: ~'left top';
@body_bg_image_repeat: ~'no-repeat';
@body_bg_image_cover: ~'auto';
@body_bg_image: ~'';
EOB;
preg_match_all("~^@([^:]+):[\~\s'\"]*([^;]+)['\";]*$~m", $str, $matches);
var_dump(array_combine($matches[1], $matches[2]));