3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $stylestr = 'text-align:center;display:block;'; $_style = array(); preg_match_all('#((.*?):(.*?);)*#', $stylestr, $matches); var_dump($matches);
based on ECAm5
Output for 4.3.0 - 5.6.21, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0RC5
array(4) { [0]=> array(2) { [0]=> string(32) "text-align:center;display:block;" [1]=> string(0) "" } [1]=> array(2) { [0]=> string(14) "display:block;" [1]=> string(0) "" } [2]=> array(2) { [0]=> string(7) "display" [1]=> string(0) "" } [3]=> array(2) { [0]=> string(5) "block" [1]=> string(0) "" } }