public function getContentSize($contentsWithPlaceholders)
    {
        $placeholderSize = $this->map(function ($value, $key) use (&$contentsWithPlaceholders){
            $count = substr_count($contentsWithPlaceholders, $key);

            return strlen($key) * $count - strlen($value) * $count;
        })->sum();

        return strlen($contentsWithPlaceholders) - $placeholderSize;
    }
public function getContentSize($contentsWithPlaceholders)
    {
        $placeholderSize = $this->map(function ($value, $key) use (&$contentsWithPlaceholders){
            $count = substr_count($contentsWithPlaceholders, $key);

            return strlen($key) * $count - strlen($value) * $count;
        })->sum();

        return strlen($contentsWithPlaceholders) - $placeholderSize;
    }
public function getContentSize ( $ contentsWithPlaceholders ) { $ placeholderSize = $ this -> map ( function ( $ value , $ key ) use ( & $ contentsWithPlaceholders ) { $ count = substr_count ( $ contentsWithPlaceholders , $ key ) ; return strlen ( $ key ) * $ count - strlen ( $ value ) * $ count ; } ) -> sum ( ) ; return strlen ( $ contentsWithPlaceholders ) - $ placeholderSize ; }
Calculate the byte size of the placeholders.

@param string $contentsWithPlaceholders
@return int
Calculate the byte size of the placeholders .