Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Split a string by a string
explode(string $separator, string $string, int $limit = PHP_INT_MAX): array
$classDirname = str_replace('/', '\\', dirname(str_replace('\\', '/', $class)));
$classDirnameSegments = explode('\\', $classDirname);
return Arr::wrap(Collection::times(count($classDirnameSegments), function ($index) use ($class, $classDirnameSegments) {
$classDirname = implode('\\', array_slice($classDirnameSegments, 0, $index));
$classDirnameSegments = explode('\\', $classDirname);
return Arr::wrap(Collection::times(count($classDirnameSegments), function ($index) use ($class, $classDirnameSegments) {
$classDirname = implode('\\', array_slice($classDirnameSegments, 0, $index));
public function id()
{
return explode('|', $this->recaller, 3)[0];
}
{
return explode('|', $this->recaller, 3)[0];
}
public function token()
{
return explode('|', $this->recaller, 3)[1];
}
{
return explode('|', $this->recaller, 3)[1];
}
public function hash()
{
return explode('|', $this->recaller, 4)[2];
}
{
return explode('|', $this->recaller, 4)[2];
}
protected function hasAllSegments()
{
$segments = explode('|', $this->recaller);
return count($segments) >= 3 && trim($segments[0]) !== '' && trim($segments[1]) !== '';
}
{
$segments = explode('|', $this->recaller);
return count($segments) >= 3 && trim($segments[0]) !== '' && trim($segments[1]) !== '';
}
public function segments()
{
return explode('|', $this->recaller);
}
}
{
return explode('|', $this->recaller);
}
}
protected function tags()
{
return array_filter(explode(',', $this->option('tags') ?? ''));
}
{
return array_filter(explode(',', $this->option('tags') ?? ''));
}
{
$fullKey = $this->store->getPrefix().sha1($namespace).':'.$key;
foreach (explode('|', $namespace) as $segment) {
$this->store->connection()->sadd($this->referenceKey($segment, $reference), $fullKey);
}
}
$fullKey = $this->store->getPrefix().sha1($namespace).':'.$key;
foreach (explode('|', $namespace) as $segment) {
$this->store->connection()->sadd($this->referenceKey($segment, $reference), $fullKey);
}
}
protected function deleteKeysByReference($reference)
{
foreach (explode('|', $this->tags->getNamespace()) as $segment) {
$this->deleteValues($segment = $this->referenceKey($segment, $reference));
$this->store->connection()->del($segment);
{
foreach (explode('|', $this->tags->getNamespace()) as $segment) {
$this->deleteValues($segment = $this->referenceKey($segment, $reference));
$this->store->connection()->del($segment);
continue;
}
$parts = explode('.', $key);
$array = &$original;
}
$parts = explode('.', $key);
$array = &$original;
return $array[$key] ?? value($default);
}
foreach (explode('.', $key) as $segment) {
if (static::accessible($array) && static::exists($array, $segment)) {
$array = $array[$segment];
} else {
}
foreach (explode('.', $key) as $segment) {
if (static::accessible($array) && static::exists($array, $segment)) {
$array = $array[$segment];
} else {
continue;
}
foreach (explode('.', $key) as $segment) {
if (static::accessible($subKeyArray) && static::exists($subKeyArray, $segment)) {
$subKeyArray = $subKeyArray[$segment];
} else {
}
foreach (explode('.', $key) as $segment) {
if (static::accessible($subKeyArray) && static::exists($subKeyArray, $segment)) {
$subKeyArray = $subKeyArray[$segment];
} else {
protected static function explodePluckParameters($value, $key)
{
$value = is_string($value) ? explode('.', $value) : $value;
$key = is_null($key) || is_array($key) ? $key : explode('.', $key);
{
$value = is_string($value) ? explode('.', $value) : $value;
$key = is_null($key) || is_array($key) ? $key : explode('.', $key);
{
$value = is_string($value) ? explode('.', $value) : $value;
$key = is_null($key) || is_array($key) ? $key : explode('.', $key);
return [$value, $key];
}
$value = is_string($value) ? explode('.', $value) : $value;
$key = is_null($key) || is_array($key) ? $key : explode('.', $key);
return [$value, $key];
}
return $array = $value;
}
$keys = explode('.', $key);
foreach ($keys as $i => $key) {
if (count($keys) === 1) {
}
$keys = explode('.', $key);
foreach ($keys as $i => $key) {
if (count($keys) === 1) {