src/PHPHtmlParser/Dom/Tag.php
public function getStyleAttributeArray(): array
    {
        $value = $this->getAttribute('style')['value'];

        if ($value === null) {
            return [];
        }

        $value = explode(';', substr(trim($value), 0, -1));
        $result = [];
        foreach ($value as $attr) {
            $attr = explode(':', $attr);
            $result[$attr[0]] = $attr[1];
        }

        return $result;
    }
public function getStyleAttributeArray(): array
    {
        $value = $this->getAttribute('style')['value'];

        if ($value === null) {
            return [];
        }

        $value = explode(';', substr(trim($value), 0, -1));
        $result = [];
        foreach ($value as $attr) {
            $attr = explode(':', $attr);
            $result[$attr[0]] = $attr[1];
        }

        return $result;
    }
public function getStyleAttributeArray ( ) : array { $ value = $ this -> getAttribute ( 'style' ) [ 'value' ] ; if ( $ value === null ) { return [ ] ; } $ value = explode ( ';' , substr ( trim ( $ value ) , 0 , - 1 ) ) ; $ result = [ ] ; foreach ( $ value as $ attr ) { $ attr = explode ( ':' , $ attr ) ; $ result [ $ attr [ 0 ] ] = $ attr [ 1 ] ; } return $ result ; }
Get style attribute in array

@return array
Get style attribute in array