3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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*([^;]+;?)$\K~m", $str, $matches); var_dump($matches);
based on s95CQ
Output for 5.6.0 - 7.3.0rc4
array(3) { [0]=> array(6) { [0]=> string(0) "" [1]=> string(0) "" [2]=> string(0) "" [3]=> string(0) "" [4]=> string(0) "" [5]=> string(0) "" } [1]=> array(6) { [0]=> string(12) "preloader_bg" [1]=> string(15) "preloader_color" [2]=> string(22) "body_bg_image_position" [3]=> string(20) "body_bg_image_repeat" [4]=> string(19) "body_bg_image_cover" [5]=> string(13) "body_bg_image" } [2]=> array(6) { [0]=> string(8) "#0081ff;" [1]=> string(5) "#fff;" [2]=> string(12) "~'left top';" [3]=> string(13) "~'no-repeat';" [4]=> string(8) "~'auto';" [5]=> string(4) "~'';" } }