Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Replace text within a portion of a string
substr_replace( array|string $string, array|string $replace, array|int $offset, array|int|null $length = null): string|array
$lengthOfTagName = strlen($tagName);
$positionOfFirstCharacterInTagName = $matches[1][1];
return substr_replace(
$dom,
' '.$attributesFormattedForHtmlElement,
$positionOfFirstCharacterInTagName + $lengthOfTagName,
0
);
}
protected function escapeStringForHtml($subject)
$positionOfFirstCharacterInTagName = $matches[1][1];
return substr_replace(
$dom,
' '.$attributesFormattedForHtmlElement,
$positionOfFirstCharacterInTagName + $lengthOfTagName,
0
);
}
protected function escapeStringForHtml($subject)
public function __invoke($string)
{
if (str($string)->endsWith(['.', '?', '!', ':'])) {
return substr_replace($string, '', -1);
}
return $string;
{
if (str($string)->endsWith(['.', '?', '!', ':'])) {
return substr_replace($string, '', -1);
}
return $string;
$position = strpos($subject, $search);
if ($position !== false) {
return substr_replace($subject, $replace, $position, strlen($search));
}
return $subject;
if ($position !== false) {
return substr_replace($subject, $replace, $position, strlen($search));
}
return $subject;
$position = strrpos($subject, $search);
if ($position !== false) {
return substr_replace($subject, $replace, $position, strlen($search));
}
return $subject;
if ($position !== false) {
return substr_replace($subject, $replace, $position, strlen($search));
}
return $subject;
$length = strlen($string);
}
return substr_replace($string, $replace, $offset, $length);
}
}
return substr_replace($string, $replace, $offset, $length);
}
public function __toString()
{
return substr_replace($this->value, '.', -$this->scale, 0);
}
}
{
return substr_replace($this->value, '.', -$this->scale, 0);
}
}
$pathPrefix = dirname(dirname(__DIR__)).DIRECTORY_SEPARATOR;
$pos = strpos($realPath, $pathPrefix);
$relativePath = ($pos !== false) ? substr_replace($realPath, '', $pos, strlen($pathPrefix)) : $realPath;
return strtr($relativePath, '\\', '/');
}
$pos = strpos($realPath, $pathPrefix);
$relativePath = ($pos !== false) ? substr_replace($realPath, '', $pos, strlen($pathPrefix)) : $realPath;
return strtr($relativePath, '\\', '/');
}
$s = ReflectionCaster::getSignature($s);
if (str_ends_with($identifier, '()')) {
$this->value = substr_replace($identifier, $s, -2);
} else {
$this->value .= $s;
}
if (str_ends_with($identifier, '()')) {
$this->value = substr_replace($identifier, $s, -2);
} else {
$this->value .= $s;
}
foreach ($f[$prefix.'src']->value as $label => $frame) {
if (str_starts_with($label, "\0~collapse=0")) {
if ($collapse) {
$label = substr_replace($label, '1', 11, 1);
} else {
$collapse = true;
}
if (str_starts_with($label, "\0~collapse=0")) {
if ($collapse) {
$label = substr_replace($label, '1', 11, 1);
} else {
$collapse = true;
}
$collapse = true;
}
}
$label = substr_replace($label, "title=Stack level $j.&", 2, 0);
}
$f = $frames[$i - 1];
if ($trace->keepArgs && !empty($f['args']) && $frame instanceof EnumStub) {
}
}
$label = substr_replace($label, "title=Stack level $j.&", 2, 0);
}
$f = $frames[$i - 1];
if ($trace->keepArgs && !empty($f['args']) && $frame instanceof EnumStub) {
$label = new ClassStub($lastCall);
if (isset($label->attr['ellipsis'])) {
$label->attr['ellipsis'] += 2;
$label = substr_replace($prefix, "ellipsis-type=class&ellipsis={$label->attr['ellipsis']}&ellipsis-tail=1&title=Stack level $j.", 2, 0).$label->value.'()';
} else {
$label = substr_replace($prefix, "title=Stack level $j.", 2, 0).$label->value.'()';
}
if (isset($label->attr['ellipsis'])) {
$label->attr['ellipsis'] += 2;
$label = substr_replace($prefix, "ellipsis-type=class&ellipsis={$label->attr['ellipsis']}&ellipsis-tail=1&title=Stack level $j.", 2, 0).$label->value.'()';
} else {
$label = substr_replace($prefix, "title=Stack level $j.", 2, 0).$label->value.'()';
}
$label->attr['ellipsis'] += 2;
$label = substr_replace($prefix, "ellipsis-type=class&ellipsis={$label->attr['ellipsis']}&ellipsis-tail=1&title=Stack level $j.", 2, 0).$label->value.'()';
} else {
$label = substr_replace($prefix, "title=Stack level $j.", 2, 0).$label->value.'()';
}
} else {
$label = substr_replace($prefix, "title=Stack level $j.", 2, 0).$lastCall;
$label = substr_replace($prefix, "ellipsis-type=class&ellipsis={$label->attr['ellipsis']}&ellipsis-tail=1&title=Stack level $j.", 2, 0).$label->value.'()';
} else {
$label = substr_replace($prefix, "title=Stack level $j.", 2, 0).$label->value.'()';
}
} else {
$label = substr_replace($prefix, "title=Stack level $j.", 2, 0).$lastCall;
$label = substr_replace($prefix, "title=Stack level $j.", 2, 0).$label->value.'()';
}
} else {
$label = substr_replace($prefix, "title=Stack level $j.", 2, 0).$lastCall;
}
$a[substr_replace($label, sprintf('separator=%s&', $frame instanceof EnumStub ? ' ' : ':'), 2, 0)] = $frame;
}
} else {
$label = substr_replace($prefix, "title=Stack level $j.", 2, 0).$lastCall;
}
$a[substr_replace($label, sprintf('separator=%s&', $frame instanceof EnumStub ? ' ' : ':'), 2, 0)] = $frame;
} else {
$label = substr_replace($prefix, "title=Stack level $j.", 2, 0).$lastCall;
}
$a[substr_replace($label, sprintf('separator=%s&', $frame instanceof EnumStub ? ' ' : ':'), 2, 0)] = $frame;
$lastCall = $call;
}
$label = substr_replace($prefix, "title=Stack level $j.", 2, 0).$lastCall;
}
$a[substr_replace($label, sprintf('separator=%s&', $frame instanceof EnumStub ? ' ' : ':'), 2, 0)] = $frame;
$lastCall = $call;
}
$precision = $column->attributes()[0];
$scale = $column->attributes()[1] ?? 0;
$value = substr_replace(str_pad("", $precision, '9'), ".", $precision - $scale, 0);
if (intval($scale) === 0) {
$value = trim($value, ".");
$scale = $column->attributes()[1] ?? 0;
$value = substr_replace(str_pad("", $precision, '9'), ".", $precision - $scale, 0);
if (intval($scale) === 0) {
$value = trim($value, ".");