Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Get string length
<?php strlen(string $string): int
<?php if (preg_match($hexPattern, $value, $matches)) {
$result = [];
$result[0] = strlen($matches[1]) == '1' ? hexdec($matches[1].$matches[1]) : hexdec($matches[1]);
$result[1] = strlen($matches[2]) == '1' ? hexdec($matches[2].$matches[2]) : hexdec($matches[2]);
$result[2] = strlen($matches[3]) == '1' ? hexdec($matches[3].$matches[3]) : hexdec($matches[3]);
$result[3] = 1;
<?php if (preg_match($hexPattern, $value, $matches)) {
$result = [];
$result[0] = strlen($matches[1]) == '1' ? hexdec($matches[1].$matches[1]) : hexdec($matches[1]);
$result[1] = strlen($matches[2]) == '1' ? hexdec($matches[2].$matches[2]) : hexdec($matches[2]);
$result[2] = strlen($matches[3]) == '1' ? hexdec($matches[3].$matches[3]) : hexdec($matches[3]);
$result[3] = 1;
} elseif (preg_match($rgbPattern, $value, $matches)) {
<?php $result = [];
$result[0] = strlen($matches[1]) == '1' ? hexdec($matches[1].$matches[1]) : hexdec($matches[1]);
$result[1] = strlen($matches[2]) == '1' ? hexdec($matches[2].$matches[2]) : hexdec($matches[2]);
$result[2] = strlen($matches[3]) == '1' ? hexdec($matches[3].$matches[3]) : hexdec($matches[3]);
$result[3] = 1;
} elseif (preg_match($rgbPattern, $value, $matches)) {
$result = [];
<?php 200,
[
'Content-Type' => $mimetype,
'Content-Length' => strlen($image->getEncoded())
],
$stream
));
<?php $width = $this->getInternalFontWidth();
$height = $this->getInternalFontHeight();
if (strlen($this->text) == 0) {
$box['width'] = 0;
$box['height'] = 0;
<?php $box['height'] = 0;
} else {
$box['width'] = strlen($this->text) * $width;
$box['height'] = $height;
}
}
<?php $dimensions = (new \Imagick())->queryFontMetrics($draw, $this->text);
if (strlen($this->text) == 0) {
$box['width'] = 0;
$box['height'] = 0;
<?php $this->image->encode($this->format, $this->quality);
$data = $this->image->getEncoded();
$mime = finfo_buffer(finfo_open(FILEINFO_MIME_TYPE), $data);
$length = strlen($data);
if (function_exists('app') && is_a($app = app(), 'Illuminate\Foundation\Application')) {
<?php ]));
$this->assertEquals(
strlen($encodedContent),
$output->getHeaderLine('Content-Length')
);
}