@enjoys/context-engine 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/commands/adb.json +322 -0
- package/data/commands/alembic.json +301 -0
- package/data/commands/artisan.json +277 -0
- package/data/commands/atlas.json +426 -0
- package/data/commands/auth0.json +648 -0
- package/data/commands/bat.json +84 -0
- package/data/commands/btop.json +59 -0
- package/data/commands/bundle.json +321 -0
- package/data/commands/composer.json +507 -0
- package/data/commands/dart.json +216 -0
- package/data/commands/dbmate.json +257 -0
- package/data/commands/docker-compose.json +384 -0
- package/data/commands/drizzle-kit.json +217 -0
- package/data/commands/expo.json +65 -0
- package/data/commands/fastlane.json +243 -0
- package/data/commands/fd.json +86 -0
- package/data/commands/flutter.json +298 -0
- package/data/commands/flyway.json +261 -0
- package/data/commands/fzf.json +103 -0
- package/data/commands/gem.json +267 -0
- package/data/commands/htop.json +56 -0
- package/data/commands/jq.json +100 -0
- package/data/commands/k9s.json +62 -0
- package/data/commands/linux.json +3007 -0
- package/data/commands/liquibase.json +399 -0
- package/data/commands/manifest.json +619 -0
- package/data/commands/minikube.json +60 -0
- package/data/commands/ng.json +64 -0
- package/data/commands/nuxt.json +60 -0
- package/data/commands/nvim.json +91 -0
- package/data/commands/php.json +157 -0
- package/data/commands/pm2.json +259 -0
- package/data/commands/pod.json +175 -0
- package/data/commands/prisma.json +257 -0
- package/data/commands/rails.json +372 -0
- package/data/commands/rake.json +360 -0
- package/data/commands/react-native.json +57 -0
- package/data/commands/rg.json +103 -0
- package/data/commands/rspec.json +257 -0
- package/data/commands/ruby.json +108 -0
- package/data/commands/screen.json +101 -0
- package/data/commands/sequelize.json +342 -0
- package/data/commands/snyk.json +442 -0
- package/data/commands/sonar-scanner.json +219 -0
- package/data/commands/stripe.json +314 -0
- package/data/commands/symfony.json +449 -0
- package/data/commands/tmux.json +197 -0
- package/data/commands/top.json +61 -0
- package/data/commands/trivy.json +367 -0
- package/data/commands/twilio.json +382 -0
- package/data/commands/typeorm.json +262 -0
- package/data/commands/vim.json +85 -0
- package/data/commands/vue.json +60 -0
- package/data/commands/wp.json +857 -0
- package/data/commands/xcodebuild.json +141 -0
- package/data/commands/yq.json +57 -0
- package/data/completion/bash.json +1184 -0
- package/data/completion/c.json +1067 -0
- package/data/completion/cpp.json +824 -0
- package/data/completion/csharp.json +860 -0
- package/data/completion/dockerfile.json +536 -0
- package/data/completion/go.json +1346 -0
- package/data/completion/html.json +806 -0
- package/data/completion/java.json +1112 -0
- package/data/completion/javascript.json +914 -0
- package/data/completion/lua.json +968 -0
- package/data/completion/php.json +1535 -0
- package/data/completion/python.json +1427 -0
- package/data/completion/ruby.json +1531 -0
- package/data/completion/rust.json +698 -0
- package/data/completion/sql.json +887 -0
- package/data/completion/toml.json +428 -0
- package/data/completion/typescript.json +338 -0
- package/data/completion/yaml.json +563 -0
- package/data/defination/bash.json +565 -0
- package/data/defination/c.json +865 -0
- package/data/defination/cpp.json +348 -0
- package/data/defination/csharp.json +144 -0
- package/data/defination/dockerfile.json +113 -0
- package/data/defination/go.json +561 -0
- package/data/defination/html.json +559 -0
- package/data/defination/java.json +184 -0
- package/data/defination/javascript.json +265 -0
- package/data/defination/lua.json +181 -0
- package/data/defination/php.json +726 -0
- package/data/defination/python.json +717 -0
- package/data/defination/ruby.json +670 -0
- package/data/defination/rust.json +207 -0
- package/data/defination/sql.json +473 -0
- package/data/defination/toml.json +251 -0
- package/data/defination/typescript.json +29 -0
- package/data/defination/yaml.json +197 -0
- package/data/hover/bash.json +245 -0
- package/data/hover/c.json +265 -0
- package/data/hover/cpp.json +210 -0
- package/data/hover/csharp.json +290 -0
- package/data/hover/dockerfile.json +145 -0
- package/data/hover/go.json +580 -0
- package/data/hover/html.json +250 -0
- package/data/hover/java.json +395 -0
- package/data/hover/javascript.json +330 -0
- package/data/hover/lua.json +265 -0
- package/data/hover/php.json +300 -0
- package/data/hover/python.json +380 -0
- package/data/hover/ruby.json +265 -0
- package/data/hover/rust.json +275 -0
- package/data/hover/sql.json +230 -0
- package/data/hover/toml.json +145 -0
- package/data/hover/typescript.json +120 -0
- package/data/hover/yaml.json +165 -0
- package/data/manifest.json +242 -0
- package/package.json +1 -1
|
@@ -0,0 +1,726 @@
|
|
|
1
|
+
{
|
|
2
|
+
"language": "php",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"array": {
|
|
5
|
+
"signature": "array",
|
|
6
|
+
"description": "An ordered map in PHP. Arrays can hold any combination of values indexed by integers or strings. They serve as lists, hash tables, dictionaries, collections, stacks, and queues.",
|
|
7
|
+
"type": "type",
|
|
8
|
+
"module": "Core",
|
|
9
|
+
"members": {
|
|
10
|
+
"array_push": { "signature": "array_push(array &$array, mixed ...$values): int", "description": "Pushes one or more elements onto the end of an array. Returns the new number of elements.", "type": "function" },
|
|
11
|
+
"array_pop": { "signature": "array_pop(array &$array): mixed", "description": "Pops and returns the last element of the array, shortening it by one.", "type": "function" },
|
|
12
|
+
"array_shift": { "signature": "array_shift(array &$array): mixed", "description": "Shifts the first value off the array and returns it, re-indexing numeric keys.", "type": "function" },
|
|
13
|
+
"array_unshift": { "signature": "array_unshift(array &$array, mixed ...$values): int", "description": "Prepends one or more elements to the beginning of an array.", "type": "function" },
|
|
14
|
+
"array_merge": { "signature": "array_merge(array ...$arrays): array", "description": "Merges one or more arrays. Numeric keys are re-indexed; string keys are overwritten by later arrays.", "type": "function" },
|
|
15
|
+
"array_combine": { "signature": "array_combine(array $keys, array $values): array", "description": "Creates an array by using one array for keys and another for its values.", "type": "function" },
|
|
16
|
+
"array_map": { "signature": "array_map(?callable $callback, array $array, array ...$arrays): array", "description": "Applies the callback to each element and returns a new array of results.", "type": "function" },
|
|
17
|
+
"array_filter": { "signature": "array_filter(array $array, ?callable $callback = null, int $mode = 0): array", "description": "Filters elements using a callback. Without callback, removes falsy values.", "type": "function" },
|
|
18
|
+
"array_reduce": { "signature": "array_reduce(array $array, callable $callback, mixed $initial = null): mixed", "description": "Iteratively reduces the array to a single value using a callback.", "type": "function" },
|
|
19
|
+
"array_keys": { "signature": "array_keys(array $array, mixed $filter_value = null, bool $strict = false): array", "description": "Returns all the keys or a subset of the keys of an array.", "type": "function" },
|
|
20
|
+
"array_values": { "signature": "array_values(array $array): array", "description": "Returns all the values from the array with numeric indexing.", "type": "function" },
|
|
21
|
+
"array_unique": { "signature": "array_unique(array $array, int $flags = SORT_STRING): array", "description": "Removes duplicate values from an array, preserving the first occurrence.", "type": "function" },
|
|
22
|
+
"array_reverse": { "signature": "array_reverse(array $array, bool $preserve_keys = false): array", "description": "Returns an array with elements in reverse order.", "type": "function" },
|
|
23
|
+
"array_slice": { "signature": "array_slice(array $array, int $offset, ?int $length = null, bool $preserve_keys = false): array", "description": "Extracts a slice of the array.", "type": "function" },
|
|
24
|
+
"array_splice": { "signature": "array_splice(array &$array, int $offset, ?int $length = null, mixed $replacement = []): array", "description": "Removes a portion of the array and optionally replaces it. Returns removed elements.", "type": "function" },
|
|
25
|
+
"array_search": { "signature": "array_search(mixed $needle, array $haystack, bool $strict = false): int|string|false", "description": "Searches the array for a value and returns the corresponding key.", "type": "function" },
|
|
26
|
+
"in_array": { "signature": "in_array(mixed $needle, array $haystack, bool $strict = false): bool", "description": "Checks if a value exists in an array.", "type": "function" },
|
|
27
|
+
"count": { "signature": "count(Countable|array $value, int $mode = COUNT_NORMAL): int", "description": "Counts all elements in an array or Countable object.", "type": "function" },
|
|
28
|
+
"sort": { "signature": "sort(array &$array, int $flags = SORT_REGULAR): true", "description": "Sorts an array in ascending order by value, re-indexing keys.", "type": "function" },
|
|
29
|
+
"usort": { "signature": "usort(array &$array, callable $callback): true", "description": "Sorts an array by values using a user-defined comparison function.", "type": "function" },
|
|
30
|
+
"array_walk": { "signature": "array_walk(array|object &$array, callable $callback, mixed $arg = null): true", "description": "Applies a user function to every member of an array.", "type": "function" },
|
|
31
|
+
"array_key_exists": { "signature": "array_key_exists(string|int $key, array $array): bool", "description": "Checks if the given key or index exists in the array.", "type": "function" },
|
|
32
|
+
"array_column": { "signature": "array_column(array $array, int|string|null $column_key, int|string|null $index_key = null): array", "description": "Returns the values from a single column of a multi-dimensional array.", "type": "function" },
|
|
33
|
+
"array_chunk": { "signature": "array_chunk(array $array, int $length, bool $preserve_keys = false): array", "description": "Splits an array into chunks of the specified size.", "type": "function" },
|
|
34
|
+
"array_diff": { "signature": "array_diff(array $array, array ...$arrays): array", "description": "Computes the difference of arrays using values for comparison.", "type": "function" },
|
|
35
|
+
"array_intersect": { "signature": "array_intersect(array $array, array ...$arrays): array", "description": "Computes the intersection of arrays using values for comparison.", "type": "function" },
|
|
36
|
+
"array_fill": { "signature": "array_fill(int $start_index, int $count, mixed $value): array", "description": "Fills an array with values, specifying start index and number of entries.", "type": "function" },
|
|
37
|
+
"compact": { "signature": "compact(array|string $var_name, array|string ...$var_names): array", "description": "Creates an array containing variables and their values.", "type": "function" },
|
|
38
|
+
"range": { "signature": "range(string|int|float $start, string|int|float $end, int|float $step = 1): array", "description": "Creates an array containing a range of elements.", "type": "function" }
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"string": {
|
|
42
|
+
"signature": "string",
|
|
43
|
+
"description": "A series of bytes in PHP. Strings are binary-safe and can be up to 2GB. String literals can be specified in four ways: single-quoted, double-quoted, heredoc, and nowdoc.",
|
|
44
|
+
"type": "type",
|
|
45
|
+
"module": "Core",
|
|
46
|
+
"members": {
|
|
47
|
+
"strlen": { "signature": "strlen(string $string): int", "description": "Returns the length of the given string in bytes.", "type": "function" },
|
|
48
|
+
"strpos": { "signature": "strpos(string $haystack, string $needle, int $offset = 0): int|false", "description": "Finds the position of the first occurrence of a substring.", "type": "function" },
|
|
49
|
+
"substr": { "signature": "substr(string $string, int $offset, ?int $length = null): string", "description": "Returns the portion of string specified by offset and length.", "type": "function" },
|
|
50
|
+
"str_replace": { "signature": "str_replace(array|string $search, array|string $replace, string|array $subject, int &$count = null): string|array", "description": "Replaces all occurrences of the search string with the replacement.", "type": "function" },
|
|
51
|
+
"str_contains": { "signature": "str_contains(string $haystack, string $needle): bool", "description": "(PHP 8.0+) Determines if a string contains a given substring.", "type": "function" },
|
|
52
|
+
"str_starts_with": { "signature": "str_starts_with(string $haystack, string $needle): bool", "description": "(PHP 8.0+) Checks if a string starts with a given substring.", "type": "function" },
|
|
53
|
+
"str_ends_with": { "signature": "str_ends_with(string $haystack, string $needle): bool", "description": "(PHP 8.0+) Checks if a string ends with a given substring.", "type": "function" },
|
|
54
|
+
"strtolower": { "signature": "strtolower(string $string): string", "description": "Returns a string with all ASCII alphabetic characters converted to lowercase.", "type": "function" },
|
|
55
|
+
"strtoupper": { "signature": "strtoupper(string $string): string", "description": "Returns a string with all ASCII alphabetic characters converted to uppercase.", "type": "function" },
|
|
56
|
+
"trim": { "signature": "trim(string $string, string $characters = \" \\n\\r\\t\\v\\0\"): string", "description": "Strips whitespace or other characters from both ends of a string.", "type": "function" },
|
|
57
|
+
"explode": { "signature": "explode(string $separator, string $string, int $limit = PHP_INT_MAX): array", "description": "Splits a string by a string delimiter and returns an array.", "type": "function" },
|
|
58
|
+
"implode": { "signature": "implode(string $separator, array $array): string", "description": "Joins array elements with a glue string.", "type": "function" },
|
|
59
|
+
"str_pad": { "signature": "str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT): string", "description": "Pads a string to a certain length with another string.", "type": "function" },
|
|
60
|
+
"str_repeat": { "signature": "str_repeat(string $string, int $times): string", "description": "Repeats a string a given number of times.", "type": "function" },
|
|
61
|
+
"sprintf": { "signature": "sprintf(string $format, mixed ...$values): string", "description": "Returns a string produced according to a format string.", "type": "function" },
|
|
62
|
+
"htmlspecialchars": { "signature": "htmlspecialchars(string $string, int $flags = ENT_QUOTES | ENT_SUBSTITUTE, ?string $encoding = null, bool $double_encode = true): string", "description": "Converts special characters to HTML entities for safe output.", "type": "function" },
|
|
63
|
+
"urlencode": { "signature": "urlencode(string $string): string", "description": "URL-encodes a string, replacing special characters with percent-encoded values.", "type": "function" },
|
|
64
|
+
"base64_encode": { "signature": "base64_encode(string $string): string", "description": "Encodes the given data with Base64.", "type": "function" }
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"DateTime": {
|
|
68
|
+
"signature": "class DateTime implements DateTimeInterface",
|
|
69
|
+
"description": "Representation of date and time. Allows manipulation of dates and times with timezone support. For immutable operations, use DateTimeImmutable instead.",
|
|
70
|
+
"type": "class",
|
|
71
|
+
"module": "Core",
|
|
72
|
+
"members": {
|
|
73
|
+
"format": { "signature": "DateTime::format(string $format): string", "description": "Returns date formatted according to given format. Common: Y-m-d, H:i:s, U (timestamp), c (ISO 8601).", "type": "method" },
|
|
74
|
+
"modify": { "signature": "DateTime::modify(string $modifier): DateTime|false", "description": "Alters the timestamp by incrementing or decrementing in a format accepted by strtotime(). E.g. '+1 day', '-2 months'.", "type": "method" },
|
|
75
|
+
"diff": { "signature": "DateTime::diff(DateTimeInterface $targetObject, bool $absolute = false): DateInterval", "description": "Returns the difference between two DateTime objects as a DateInterval.", "type": "method" },
|
|
76
|
+
"getTimestamp": { "signature": "DateTime::getTimestamp(): int", "description": "Gets the Unix timestamp for the DateTime object.", "type": "method" },
|
|
77
|
+
"createFromFormat": { "signature": "static DateTime::createFromFormat(string $format, string $datetime, ?DateTimeZone $timezone = null): DateTime|false", "description": "Parses a date string according to a specified format. Returns false on failure.", "type": "method" },
|
|
78
|
+
"setTimezone": { "signature": "DateTime::setTimezone(DateTimeZone $timezone): DateTime", "description": "Sets the time zone for the DateTime object.", "type": "method" },
|
|
79
|
+
"add": { "signature": "DateTime::add(DateInterval $interval): DateTime", "description": "Modifies the DateTime object by adding the given DateInterval.", "type": "method" },
|
|
80
|
+
"sub": { "signature": "DateTime::sub(DateInterval $interval): DateTime", "description": "Modifies the DateTime object by subtracting the given DateInterval.", "type": "method" }
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"DateTimeImmutable": {
|
|
84
|
+
"signature": "class DateTimeImmutable implements DateTimeInterface",
|
|
85
|
+
"description": "Immutable representation of date and time. Unlike DateTime, modification methods return a new instance instead of modifying the existing one.",
|
|
86
|
+
"type": "class",
|
|
87
|
+
"module": "Core",
|
|
88
|
+
"members": {
|
|
89
|
+
"format": { "signature": "DateTimeImmutable::format(string $format): string", "description": "Returns date formatted according to given format.", "type": "method" },
|
|
90
|
+
"modify": { "signature": "DateTimeImmutable::modify(string $modifier): DateTimeImmutable|false", "description": "Creates a new object with modified timestamp. The original is not changed.", "type": "method" },
|
|
91
|
+
"diff": { "signature": "DateTimeImmutable::diff(DateTimeInterface $targetObject, bool $absolute = false): DateInterval", "description": "Returns the difference between two DateTimeInterface objects.", "type": "method" },
|
|
92
|
+
"getTimestamp": { "signature": "DateTimeImmutable::getTimestamp(): int", "description": "Gets the Unix timestamp.", "type": "method" },
|
|
93
|
+
"createFromFormat": { "signature": "static DateTimeImmutable::createFromFormat(string $format, string $datetime, ?DateTimeZone $timezone = null): DateTimeImmutable|false", "description": "Parses a date string according to a specified format.", "type": "method" },
|
|
94
|
+
"setTimezone": { "signature": "DateTimeImmutable::setTimezone(DateTimeZone $timezone): DateTimeImmutable", "description": "Returns a new instance with the specified time zone.", "type": "method" },
|
|
95
|
+
"add": { "signature": "DateTimeImmutable::add(DateInterval $interval): DateTimeImmutable", "description": "Returns a new object with the given DateInterval added.", "type": "method" },
|
|
96
|
+
"sub": { "signature": "DateTimeImmutable::sub(DateInterval $interval): DateTimeImmutable", "description": "Returns a new object with the given DateInterval subtracted.", "type": "method" }
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"SplStack": {
|
|
100
|
+
"signature": "class SplStack extends SplDoublyLinkedList",
|
|
101
|
+
"description": "Provides the main functionalities of a stack implemented using a doubly linked list. Iteration is LIFO (Last In, First Out).",
|
|
102
|
+
"type": "class",
|
|
103
|
+
"module": "SPL",
|
|
104
|
+
"members": {
|
|
105
|
+
"push": { "signature": "SplStack::push(mixed $value): void", "description": "Pushes an element at the top of the stack.", "type": "method" },
|
|
106
|
+
"pop": { "signature": "SplStack::pop(): mixed", "description": "Pops a node from the top of the stack.", "type": "method" },
|
|
107
|
+
"top": { "signature": "SplStack::top(): mixed", "description": "Peeks at the top of the stack without removing it.", "type": "method" },
|
|
108
|
+
"isEmpty": { "signature": "SplStack::isEmpty(): bool", "description": "Checks whether the stack is empty.", "type": "method" },
|
|
109
|
+
"count": { "signature": "SplStack::count(): int", "description": "Returns the number of elements in the stack.", "type": "method" }
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"SplQueue": {
|
|
113
|
+
"signature": "class SplQueue extends SplDoublyLinkedList",
|
|
114
|
+
"description": "Provides the main functionalities of a queue implemented using a doubly linked list. Iteration is FIFO (First In, First Out).",
|
|
115
|
+
"type": "class",
|
|
116
|
+
"module": "SPL",
|
|
117
|
+
"members": {
|
|
118
|
+
"enqueue": { "signature": "SplQueue::enqueue(mixed $value): void", "description": "Adds an element to the end of the queue.", "type": "method" },
|
|
119
|
+
"dequeue": { "signature": "SplQueue::dequeue(): mixed", "description": "Dequeues a node from the front of the queue.", "type": "method" },
|
|
120
|
+
"bottom": { "signature": "SplQueue::bottom(): mixed", "description": "Peeks at the node from the beginning of the queue.", "type": "method" },
|
|
121
|
+
"isEmpty": { "signature": "SplQueue::isEmpty(): bool", "description": "Checks whether the queue is empty.", "type": "method" },
|
|
122
|
+
"count": { "signature": "SplQueue::count(): int", "description": "Returns the number of elements in the queue.", "type": "method" }
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"ArrayObject": {
|
|
126
|
+
"signature": "class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Countable",
|
|
127
|
+
"description": "Allows objects to work as arrays. Provides array-like access with bracket syntax and iteration, with the flexibility of an object.",
|
|
128
|
+
"type": "class",
|
|
129
|
+
"module": "SPL",
|
|
130
|
+
"members": {
|
|
131
|
+
"offsetGet": { "signature": "ArrayObject::offsetGet(mixed $key): mixed", "description": "Returns the value at the specified index.", "type": "method" },
|
|
132
|
+
"offsetSet": { "signature": "ArrayObject::offsetSet(mixed $key, mixed $value): void", "description": "Sets the value at the specified index.", "type": "method" },
|
|
133
|
+
"offsetExists": { "signature": "ArrayObject::offsetExists(mixed $key): bool", "description": "Returns whether the requested index exists.", "type": "method" },
|
|
134
|
+
"offsetUnset": { "signature": "ArrayObject::offsetUnset(mixed $key): void", "description": "Unsets the value at the specified index.", "type": "method" },
|
|
135
|
+
"append": { "signature": "ArrayObject::append(mixed $value): void", "description": "Appends the value as the last element.", "type": "method" },
|
|
136
|
+
"count": { "signature": "ArrayObject::count(): int", "description": "Returns the number of public properties or array elements.", "type": "method" },
|
|
137
|
+
"getArrayCopy": { "signature": "ArrayObject::getArrayCopy(): array", "description": "Creates a copy of the ArrayObject as a standard array.", "type": "method" },
|
|
138
|
+
"getIterator": { "signature": "ArrayObject::getIterator(): ArrayIterator", "description": "Creates an external iterator for iterating over the object.", "type": "method" }
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"strlen": {
|
|
142
|
+
"signature": "strlen(string $string): int",
|
|
143
|
+
"description": "Returns the length of the given string in bytes. For multi-byte character length, use mb_strlen() instead.",
|
|
144
|
+
"type": "function",
|
|
145
|
+
"module": "Core",
|
|
146
|
+
"parameters": [
|
|
147
|
+
{ "name": "string", "type": "string", "description": "The string being measured for length" }
|
|
148
|
+
],
|
|
149
|
+
"returns": "int"
|
|
150
|
+
},
|
|
151
|
+
"strpos": {
|
|
152
|
+
"signature": "strpos(string $haystack, string $needle, int $offset = 0): int|false",
|
|
153
|
+
"description": "Finds the numeric position of the first occurrence of needle in the haystack string.",
|
|
154
|
+
"type": "function",
|
|
155
|
+
"module": "Core",
|
|
156
|
+
"parameters": [
|
|
157
|
+
{ "name": "haystack", "type": "string", "description": "The string to search in" },
|
|
158
|
+
{ "name": "needle", "type": "string", "description": "The string to search for" },
|
|
159
|
+
{ "name": "offset", "type": "int", "description": "Search start position (default 0)" }
|
|
160
|
+
],
|
|
161
|
+
"returns": "int|false"
|
|
162
|
+
},
|
|
163
|
+
"substr": {
|
|
164
|
+
"signature": "substr(string $string, int $offset, ?int $length = null): string",
|
|
165
|
+
"description": "Returns the portion of string specified by the offset and length parameters.",
|
|
166
|
+
"type": "function",
|
|
167
|
+
"module": "Core",
|
|
168
|
+
"parameters": [
|
|
169
|
+
{ "name": "string", "type": "string", "description": "The input string" },
|
|
170
|
+
{ "name": "offset", "type": "int", "description": "Start position; negative counts from end" },
|
|
171
|
+
{ "name": "length", "type": "?int", "description": "Maximum number of characters to return" }
|
|
172
|
+
],
|
|
173
|
+
"returns": "string"
|
|
174
|
+
},
|
|
175
|
+
"str_replace": {
|
|
176
|
+
"signature": "str_replace(array|string $search, array|string $replace, string|array $subject, int &$count = null): string|array",
|
|
177
|
+
"description": "Replaces all occurrences of the search string with the replacement string. Works with both strings and arrays.",
|
|
178
|
+
"type": "function",
|
|
179
|
+
"module": "Core",
|
|
180
|
+
"parameters": [
|
|
181
|
+
{ "name": "search", "type": "array|string", "description": "The value(s) being searched for" },
|
|
182
|
+
{ "name": "replace", "type": "array|string", "description": "The replacement value(s)" },
|
|
183
|
+
{ "name": "subject", "type": "string|array", "description": "The string or array being searched and replaced on" },
|
|
184
|
+
{ "name": "count", "type": "int", "description": "If passed, set to the number of replacements performed" }
|
|
185
|
+
],
|
|
186
|
+
"returns": "string|array"
|
|
187
|
+
},
|
|
188
|
+
"str_contains": {
|
|
189
|
+
"signature": "str_contains(string $haystack, string $needle): bool",
|
|
190
|
+
"description": "(PHP 8.0+) Performs a case-sensitive check indicating if needle is contained in haystack.",
|
|
191
|
+
"type": "function",
|
|
192
|
+
"module": "Core",
|
|
193
|
+
"parameters": [
|
|
194
|
+
{ "name": "haystack", "type": "string", "description": "The string to search in" },
|
|
195
|
+
{ "name": "needle", "type": "string", "description": "The substring to search for" }
|
|
196
|
+
],
|
|
197
|
+
"returns": "bool"
|
|
198
|
+
},
|
|
199
|
+
"str_starts_with": {
|
|
200
|
+
"signature": "str_starts_with(string $haystack, string $needle): bool",
|
|
201
|
+
"description": "(PHP 8.0+) Checks if a string starts with a given substring. Case-sensitive.",
|
|
202
|
+
"type": "function",
|
|
203
|
+
"module": "Core",
|
|
204
|
+
"parameters": [
|
|
205
|
+
{ "name": "haystack", "type": "string", "description": "The string to search in" },
|
|
206
|
+
{ "name": "needle", "type": "string", "description": "The substring to search for at the start" }
|
|
207
|
+
],
|
|
208
|
+
"returns": "bool"
|
|
209
|
+
},
|
|
210
|
+
"str_ends_with": {
|
|
211
|
+
"signature": "str_ends_with(string $haystack, string $needle): bool",
|
|
212
|
+
"description": "(PHP 8.0+) Checks if a string ends with a given substring. Case-sensitive.",
|
|
213
|
+
"type": "function",
|
|
214
|
+
"module": "Core",
|
|
215
|
+
"parameters": [
|
|
216
|
+
{ "name": "haystack", "type": "string", "description": "The string to search in" },
|
|
217
|
+
{ "name": "needle", "type": "string", "description": "The substring to search for at the end" }
|
|
218
|
+
],
|
|
219
|
+
"returns": "bool"
|
|
220
|
+
},
|
|
221
|
+
"strtolower": {
|
|
222
|
+
"signature": "strtolower(string $string): string",
|
|
223
|
+
"description": "Returns a string with all ASCII alphabetic characters converted to lowercase.",
|
|
224
|
+
"type": "function",
|
|
225
|
+
"module": "Core",
|
|
226
|
+
"parameters": [
|
|
227
|
+
{ "name": "string", "type": "string", "description": "The input string" }
|
|
228
|
+
],
|
|
229
|
+
"returns": "string"
|
|
230
|
+
},
|
|
231
|
+
"strtoupper": {
|
|
232
|
+
"signature": "strtoupper(string $string): string",
|
|
233
|
+
"description": "Returns a string with all ASCII alphabetic characters converted to uppercase.",
|
|
234
|
+
"type": "function",
|
|
235
|
+
"module": "Core",
|
|
236
|
+
"parameters": [
|
|
237
|
+
{ "name": "string", "type": "string", "description": "The input string" }
|
|
238
|
+
],
|
|
239
|
+
"returns": "string"
|
|
240
|
+
},
|
|
241
|
+
"trim": {
|
|
242
|
+
"signature": "trim(string $string, string $characters = \" \\n\\r\\t\\v\\0\"): string",
|
|
243
|
+
"description": "Strips whitespace (or other characters) from the beginning and end of a string.",
|
|
244
|
+
"type": "function",
|
|
245
|
+
"module": "Core",
|
|
246
|
+
"parameters": [
|
|
247
|
+
{ "name": "string", "type": "string", "description": "The string that will be trimmed" },
|
|
248
|
+
{ "name": "characters", "type": "string", "description": "Characters to strip" }
|
|
249
|
+
],
|
|
250
|
+
"returns": "string"
|
|
251
|
+
},
|
|
252
|
+
"explode": {
|
|
253
|
+
"signature": "explode(string $separator, string $string, int $limit = PHP_INT_MAX): array",
|
|
254
|
+
"description": "Returns an array of strings, each of which is a substring of string formed by splitting on the separator.",
|
|
255
|
+
"type": "function",
|
|
256
|
+
"module": "Core",
|
|
257
|
+
"parameters": [
|
|
258
|
+
{ "name": "separator", "type": "string", "description": "The boundary string" },
|
|
259
|
+
{ "name": "string", "type": "string", "description": "The input string" },
|
|
260
|
+
{ "name": "limit", "type": "int", "description": "Maximum number of elements in the result" }
|
|
261
|
+
],
|
|
262
|
+
"returns": "array"
|
|
263
|
+
},
|
|
264
|
+
"implode": {
|
|
265
|
+
"signature": "implode(string $separator, array $array): string",
|
|
266
|
+
"description": "Joins array elements with a glue string. join() is an alias.",
|
|
267
|
+
"type": "function",
|
|
268
|
+
"module": "Core",
|
|
269
|
+
"parameters": [
|
|
270
|
+
{ "name": "separator", "type": "string", "description": "The glue string placed between elements" },
|
|
271
|
+
{ "name": "array", "type": "array", "description": "The array of strings to join" }
|
|
272
|
+
],
|
|
273
|
+
"returns": "string"
|
|
274
|
+
},
|
|
275
|
+
"str_pad": {
|
|
276
|
+
"signature": "str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT): string",
|
|
277
|
+
"description": "Pads a string to a certain length with another string.",
|
|
278
|
+
"type": "function",
|
|
279
|
+
"module": "Core",
|
|
280
|
+
"parameters": [
|
|
281
|
+
{ "name": "string", "type": "string", "description": "The input string" },
|
|
282
|
+
{ "name": "length", "type": "int", "description": "Desired length of the final string" },
|
|
283
|
+
{ "name": "pad_string", "type": "string", "description": "String to pad with" },
|
|
284
|
+
{ "name": "pad_type", "type": "int", "description": "STR_PAD_RIGHT, STR_PAD_LEFT, or STR_PAD_BOTH" }
|
|
285
|
+
],
|
|
286
|
+
"returns": "string"
|
|
287
|
+
},
|
|
288
|
+
"str_repeat": {
|
|
289
|
+
"signature": "str_repeat(string $string, int $times): string",
|
|
290
|
+
"description": "Returns a string repeated the specified number of times.",
|
|
291
|
+
"type": "function",
|
|
292
|
+
"module": "Core",
|
|
293
|
+
"parameters": [
|
|
294
|
+
{ "name": "string", "type": "string", "description": "The string to be repeated" },
|
|
295
|
+
{ "name": "times", "type": "int", "description": "Number of times to repeat" }
|
|
296
|
+
],
|
|
297
|
+
"returns": "string"
|
|
298
|
+
},
|
|
299
|
+
"sprintf": {
|
|
300
|
+
"signature": "sprintf(string $format, mixed ...$values): string",
|
|
301
|
+
"description": "Returns a string produced according to the formatting string format.",
|
|
302
|
+
"type": "function",
|
|
303
|
+
"module": "Core",
|
|
304
|
+
"parameters": [
|
|
305
|
+
{ "name": "format", "type": "string", "description": "The format string with conversion specifiers" },
|
|
306
|
+
{ "name": "values", "type": "mixed", "description": "Values to insert into format specifiers" }
|
|
307
|
+
],
|
|
308
|
+
"returns": "string"
|
|
309
|
+
},
|
|
310
|
+
"htmlspecialchars": {
|
|
311
|
+
"signature": "htmlspecialchars(string $string, int $flags = ENT_QUOTES | ENT_SUBSTITUTE, ?string $encoding = null, bool $double_encode = true): string",
|
|
312
|
+
"description": "Converts special characters to HTML entities. Essential for XSS prevention.",
|
|
313
|
+
"type": "function",
|
|
314
|
+
"module": "Core",
|
|
315
|
+
"parameters": [
|
|
316
|
+
{ "name": "string", "type": "string", "description": "The string being converted" },
|
|
317
|
+
{ "name": "flags", "type": "int", "description": "Bitmask of ENT_* constants" },
|
|
318
|
+
{ "name": "encoding", "type": "?string", "description": "Character encoding (default: ini get default_charset)" },
|
|
319
|
+
{ "name": "double_encode", "type": "bool", "description": "Whether to encode existing HTML entities" }
|
|
320
|
+
],
|
|
321
|
+
"returns": "string"
|
|
322
|
+
},
|
|
323
|
+
"urlencode": {
|
|
324
|
+
"signature": "urlencode(string $string): string",
|
|
325
|
+
"description": "URL-encodes a string, replacing special characters with percent-encoded values. Spaces become +.",
|
|
326
|
+
"type": "function",
|
|
327
|
+
"module": "Core",
|
|
328
|
+
"parameters": [
|
|
329
|
+
{ "name": "string", "type": "string", "description": "The string to be encoded" }
|
|
330
|
+
],
|
|
331
|
+
"returns": "string"
|
|
332
|
+
},
|
|
333
|
+
"base64_encode": {
|
|
334
|
+
"signature": "base64_encode(string $string): string",
|
|
335
|
+
"description": "Encodes data with MIME base64. Designed to make binary data survive transport through non-binary-safe channels.",
|
|
336
|
+
"type": "function",
|
|
337
|
+
"module": "Core",
|
|
338
|
+
"parameters": [
|
|
339
|
+
{ "name": "string", "type": "string", "description": "The data to encode" }
|
|
340
|
+
],
|
|
341
|
+
"returns": "string"
|
|
342
|
+
},
|
|
343
|
+
"array_push": {
|
|
344
|
+
"signature": "array_push(array &$array, mixed ...$values): int",
|
|
345
|
+
"description": "Pushes one or more elements onto the end of an array. Equivalent to $array[] = $value for a single value.",
|
|
346
|
+
"type": "function",
|
|
347
|
+
"module": "Core",
|
|
348
|
+
"parameters": [
|
|
349
|
+
{ "name": "array", "type": "array", "description": "The input array (passed by reference)" },
|
|
350
|
+
{ "name": "values", "type": "mixed", "description": "The values to push" }
|
|
351
|
+
],
|
|
352
|
+
"returns": "int"
|
|
353
|
+
},
|
|
354
|
+
"array_pop": {
|
|
355
|
+
"signature": "array_pop(array &$array): mixed",
|
|
356
|
+
"description": "Pops and returns the last element of the array, shortening the array by one element.",
|
|
357
|
+
"type": "function",
|
|
358
|
+
"module": "Core",
|
|
359
|
+
"parameters": [
|
|
360
|
+
{ "name": "array", "type": "array", "description": "The array to get the value from" }
|
|
361
|
+
],
|
|
362
|
+
"returns": "mixed"
|
|
363
|
+
},
|
|
364
|
+
"array_shift": {
|
|
365
|
+
"signature": "array_shift(array &$array): mixed",
|
|
366
|
+
"description": "Shifts the first value off the array and returns it. Numeric keys are re-indexed starting from zero.",
|
|
367
|
+
"type": "function",
|
|
368
|
+
"module": "Core",
|
|
369
|
+
"parameters": [
|
|
370
|
+
{ "name": "array", "type": "array", "description": "The input array" }
|
|
371
|
+
],
|
|
372
|
+
"returns": "mixed"
|
|
373
|
+
},
|
|
374
|
+
"array_unshift": {
|
|
375
|
+
"signature": "array_unshift(array &$array, mixed ...$values): int",
|
|
376
|
+
"description": "Prepends one or more elements to the beginning of an array. All numerical keys are re-indexed.",
|
|
377
|
+
"type": "function",
|
|
378
|
+
"module": "Core",
|
|
379
|
+
"parameters": [
|
|
380
|
+
{ "name": "array", "type": "array", "description": "The input array" },
|
|
381
|
+
{ "name": "values", "type": "mixed", "description": "The values to prepend" }
|
|
382
|
+
],
|
|
383
|
+
"returns": "int"
|
|
384
|
+
},
|
|
385
|
+
"array_merge": {
|
|
386
|
+
"signature": "array_merge(array ...$arrays): array",
|
|
387
|
+
"description": "Merges the elements of one or more arrays. Numeric keys are re-indexed; string keys are overwritten by later arrays.",
|
|
388
|
+
"type": "function",
|
|
389
|
+
"module": "Core",
|
|
390
|
+
"parameters": [
|
|
391
|
+
{ "name": "arrays", "type": "array", "description": "Arrays to merge" }
|
|
392
|
+
],
|
|
393
|
+
"returns": "array"
|
|
394
|
+
},
|
|
395
|
+
"array_map": {
|
|
396
|
+
"signature": "array_map(?callable $callback, array $array, array ...$arrays): array",
|
|
397
|
+
"description": "Applies the callback to the elements of the given arrays and returns a new array containing the results.",
|
|
398
|
+
"type": "function",
|
|
399
|
+
"module": "Core",
|
|
400
|
+
"parameters": [
|
|
401
|
+
{ "name": "callback", "type": "?callable", "description": "Callback function to apply to each element" },
|
|
402
|
+
{ "name": "array", "type": "array", "description": "Array to run through the callback" },
|
|
403
|
+
{ "name": "arrays", "type": "array", "description": "Additional arrays for multi-array mapping" }
|
|
404
|
+
],
|
|
405
|
+
"returns": "array"
|
|
406
|
+
},
|
|
407
|
+
"array_filter": {
|
|
408
|
+
"signature": "array_filter(array $array, ?callable $callback = null, int $mode = 0): array",
|
|
409
|
+
"description": "Filters elements of an array using a callback function. Keys are preserved.",
|
|
410
|
+
"type": "function",
|
|
411
|
+
"module": "Core",
|
|
412
|
+
"parameters": [
|
|
413
|
+
{ "name": "array", "type": "array", "description": "The array to iterate over" },
|
|
414
|
+
{ "name": "callback", "type": "?callable", "description": "The callback function; if null, removes falsy values" },
|
|
415
|
+
{ "name": "mode", "type": "int", "description": "Flag determining callback arguments (ARRAY_FILTER_USE_KEY, ARRAY_FILTER_USE_BOTH)" }
|
|
416
|
+
],
|
|
417
|
+
"returns": "array"
|
|
418
|
+
},
|
|
419
|
+
"array_reduce": {
|
|
420
|
+
"signature": "array_reduce(array $array, callable $callback, mixed $initial = null): mixed",
|
|
421
|
+
"description": "Iteratively reduces the array to a single value using a callback function.",
|
|
422
|
+
"type": "function",
|
|
423
|
+
"module": "Core",
|
|
424
|
+
"parameters": [
|
|
425
|
+
{ "name": "array", "type": "array", "description": "The input array" },
|
|
426
|
+
{ "name": "callback", "type": "callable", "description": "Function receiving (carry, item) and returning carry" },
|
|
427
|
+
{ "name": "initial", "type": "mixed", "description": "Initial value for the carry" }
|
|
428
|
+
],
|
|
429
|
+
"returns": "mixed"
|
|
430
|
+
},
|
|
431
|
+
"array_keys": {
|
|
432
|
+
"signature": "array_keys(array $array, mixed $filter_value = null, bool $strict = false): array",
|
|
433
|
+
"description": "Returns all the keys or a subset of the keys of an array.",
|
|
434
|
+
"type": "function",
|
|
435
|
+
"module": "Core",
|
|
436
|
+
"parameters": [
|
|
437
|
+
{ "name": "array", "type": "array", "description": "The input array" },
|
|
438
|
+
{ "name": "filter_value", "type": "mixed", "description": "If specified, only keys containing this value are returned" },
|
|
439
|
+
{ "name": "strict", "type": "bool", "description": "Use strict comparison (===)" }
|
|
440
|
+
],
|
|
441
|
+
"returns": "array"
|
|
442
|
+
},
|
|
443
|
+
"array_values": {
|
|
444
|
+
"signature": "array_values(array $array): array",
|
|
445
|
+
"description": "Returns all the values from the array and indexes the array numerically.",
|
|
446
|
+
"type": "function",
|
|
447
|
+
"module": "Core",
|
|
448
|
+
"parameters": [
|
|
449
|
+
{ "name": "array", "type": "array", "description": "The input array" }
|
|
450
|
+
],
|
|
451
|
+
"returns": "array"
|
|
452
|
+
},
|
|
453
|
+
"array_unique": {
|
|
454
|
+
"signature": "array_unique(array $array, int $flags = SORT_STRING): array",
|
|
455
|
+
"description": "Removes duplicate values from an array. The first occurrence of each value is kept.",
|
|
456
|
+
"type": "function",
|
|
457
|
+
"module": "Core",
|
|
458
|
+
"parameters": [
|
|
459
|
+
{ "name": "array", "type": "array", "description": "The input array" },
|
|
460
|
+
{ "name": "flags", "type": "int", "description": "Sorting behavior flag" }
|
|
461
|
+
],
|
|
462
|
+
"returns": "array"
|
|
463
|
+
},
|
|
464
|
+
"array_reverse": {
|
|
465
|
+
"signature": "array_reverse(array $array, bool $preserve_keys = false): array",
|
|
466
|
+
"description": "Returns an array with elements in reverse order.",
|
|
467
|
+
"type": "function",
|
|
468
|
+
"module": "Core",
|
|
469
|
+
"parameters": [
|
|
470
|
+
{ "name": "array", "type": "array", "description": "The input array" },
|
|
471
|
+
{ "name": "preserve_keys", "type": "bool", "description": "Whether to preserve numeric keys" }
|
|
472
|
+
],
|
|
473
|
+
"returns": "array"
|
|
474
|
+
},
|
|
475
|
+
"array_slice": {
|
|
476
|
+
"signature": "array_slice(array $array, int $offset, ?int $length = null, bool $preserve_keys = false): array",
|
|
477
|
+
"description": "Extracts a slice of the array.",
|
|
478
|
+
"type": "function",
|
|
479
|
+
"module": "Core",
|
|
480
|
+
"parameters": [
|
|
481
|
+
{ "name": "array", "type": "array", "description": "The input array" },
|
|
482
|
+
{ "name": "offset", "type": "int", "description": "Start position" },
|
|
483
|
+
{ "name": "length", "type": "?int", "description": "Number of elements to return" },
|
|
484
|
+
{ "name": "preserve_keys", "type": "bool", "description": "Whether to preserve keys" }
|
|
485
|
+
],
|
|
486
|
+
"returns": "array"
|
|
487
|
+
},
|
|
488
|
+
"array_splice": {
|
|
489
|
+
"signature": "array_splice(array &$array, int $offset, ?int $length = null, mixed $replacement = []): array",
|
|
490
|
+
"description": "Removes a portion of the array and replaces it with something else. Returns the removed elements.",
|
|
491
|
+
"type": "function",
|
|
492
|
+
"module": "Core",
|
|
493
|
+
"parameters": [
|
|
494
|
+
{ "name": "array", "type": "array", "description": "The input array (modified by reference)" },
|
|
495
|
+
{ "name": "offset", "type": "int", "description": "Start position for removal" },
|
|
496
|
+
{ "name": "length", "type": "?int", "description": "Number of elements to remove" },
|
|
497
|
+
{ "name": "replacement", "type": "mixed", "description": "Elements to insert at the offset" }
|
|
498
|
+
],
|
|
499
|
+
"returns": "array"
|
|
500
|
+
},
|
|
501
|
+
"array_search": {
|
|
502
|
+
"signature": "array_search(mixed $needle, array $haystack, bool $strict = false): int|string|false",
|
|
503
|
+
"description": "Searches the array for a given value and returns the first corresponding key if successful.",
|
|
504
|
+
"type": "function",
|
|
505
|
+
"module": "Core",
|
|
506
|
+
"parameters": [
|
|
507
|
+
{ "name": "needle", "type": "mixed", "description": "The searched value" },
|
|
508
|
+
{ "name": "haystack", "type": "array", "description": "The array to search in" },
|
|
509
|
+
{ "name": "strict", "type": "bool", "description": "Use strict type comparison" }
|
|
510
|
+
],
|
|
511
|
+
"returns": "int|string|false"
|
|
512
|
+
},
|
|
513
|
+
"in_array": {
|
|
514
|
+
"signature": "in_array(mixed $needle, array $haystack, bool $strict = false): bool",
|
|
515
|
+
"description": "Checks if a value exists in an array.",
|
|
516
|
+
"type": "function",
|
|
517
|
+
"module": "Core",
|
|
518
|
+
"parameters": [
|
|
519
|
+
{ "name": "needle", "type": "mixed", "description": "The searched value" },
|
|
520
|
+
{ "name": "haystack", "type": "array", "description": "The array to search" },
|
|
521
|
+
{ "name": "strict", "type": "bool", "description": "Use strict comparison (===)" }
|
|
522
|
+
],
|
|
523
|
+
"returns": "bool"
|
|
524
|
+
},
|
|
525
|
+
"count": {
|
|
526
|
+
"signature": "count(Countable|array $value, int $mode = COUNT_NORMAL): int",
|
|
527
|
+
"description": "Counts all elements in an array or a Countable object.",
|
|
528
|
+
"type": "function",
|
|
529
|
+
"module": "Core",
|
|
530
|
+
"parameters": [
|
|
531
|
+
{ "name": "value", "type": "Countable|array", "description": "The array or Countable object" },
|
|
532
|
+
{ "name": "mode", "type": "int", "description": "COUNT_NORMAL or COUNT_RECURSIVE" }
|
|
533
|
+
],
|
|
534
|
+
"returns": "int"
|
|
535
|
+
},
|
|
536
|
+
"sort": {
|
|
537
|
+
"signature": "sort(array &$array, int $flags = SORT_REGULAR): true",
|
|
538
|
+
"description": "Sorts an array in ascending order by value. Existing keys are discarded and the array is re-indexed.",
|
|
539
|
+
"type": "function",
|
|
540
|
+
"module": "Core",
|
|
541
|
+
"parameters": [
|
|
542
|
+
{ "name": "array", "type": "array", "description": "The input array" },
|
|
543
|
+
{ "name": "flags", "type": "int", "description": "Sorting type flags (SORT_REGULAR, SORT_NUMERIC, etc.)" }
|
|
544
|
+
],
|
|
545
|
+
"returns": "true"
|
|
546
|
+
},
|
|
547
|
+
"usort": {
|
|
548
|
+
"signature": "usort(array &$array, callable $callback): true",
|
|
549
|
+
"description": "Sorts an array by values using a user-defined comparison function.",
|
|
550
|
+
"type": "function",
|
|
551
|
+
"module": "Core",
|
|
552
|
+
"parameters": [
|
|
553
|
+
{ "name": "array", "type": "array", "description": "The input array" },
|
|
554
|
+
{ "name": "callback", "type": "callable", "description": "Comparison function returning < 0, 0, or > 0" }
|
|
555
|
+
],
|
|
556
|
+
"returns": "true"
|
|
557
|
+
},
|
|
558
|
+
"array_walk": {
|
|
559
|
+
"signature": "array_walk(array|object &$array, callable $callback, mixed $arg = null): true",
|
|
560
|
+
"description": "Applies a user-supplied function to every member of an array.",
|
|
561
|
+
"type": "function",
|
|
562
|
+
"module": "Core",
|
|
563
|
+
"parameters": [
|
|
564
|
+
{ "name": "array", "type": "array|object", "description": "The input array" },
|
|
565
|
+
{ "name": "callback", "type": "callable", "description": "Function receiving (&$value, $key, $arg)" },
|
|
566
|
+
{ "name": "arg", "type": "mixed", "description": "Extra parameter passed to callback" }
|
|
567
|
+
],
|
|
568
|
+
"returns": "true"
|
|
569
|
+
},
|
|
570
|
+
"array_key_exists": {
|
|
571
|
+
"signature": "array_key_exists(string|int $key, array $array): bool",
|
|
572
|
+
"description": "Returns true if the given key/index exists in the array. Unlike isset(), returns true even if value is null.",
|
|
573
|
+
"type": "function",
|
|
574
|
+
"module": "Core",
|
|
575
|
+
"parameters": [
|
|
576
|
+
{ "name": "key", "type": "string|int", "description": "Value to check" },
|
|
577
|
+
{ "name": "array", "type": "array", "description": "Array with keys to check" }
|
|
578
|
+
],
|
|
579
|
+
"returns": "bool"
|
|
580
|
+
},
|
|
581
|
+
"array_column": {
|
|
582
|
+
"signature": "array_column(array $array, int|string|null $column_key, int|string|null $index_key = null): array",
|
|
583
|
+
"description": "Returns the values from a single column of a multi-dimensional array.",
|
|
584
|
+
"type": "function",
|
|
585
|
+
"module": "Core",
|
|
586
|
+
"parameters": [
|
|
587
|
+
{ "name": "array", "type": "array", "description": "A multi-dimensional array or array of objects" },
|
|
588
|
+
{ "name": "column_key", "type": "int|string|null", "description": "The column of values to return" },
|
|
589
|
+
{ "name": "index_key", "type": "int|string|null", "description": "The column to use as index/keys" }
|
|
590
|
+
],
|
|
591
|
+
"returns": "array"
|
|
592
|
+
},
|
|
593
|
+
"array_chunk": {
|
|
594
|
+
"signature": "array_chunk(array $array, int $length, bool $preserve_keys = false): array",
|
|
595
|
+
"description": "Splits an array into chunks of the given size.",
|
|
596
|
+
"type": "function",
|
|
597
|
+
"module": "Core",
|
|
598
|
+
"parameters": [
|
|
599
|
+
{ "name": "array", "type": "array", "description": "The array to split" },
|
|
600
|
+
{ "name": "length", "type": "int", "description": "The size of each chunk" },
|
|
601
|
+
{ "name": "preserve_keys", "type": "bool", "description": "Whether to preserve keys" }
|
|
602
|
+
],
|
|
603
|
+
"returns": "array"
|
|
604
|
+
},
|
|
605
|
+
"array_combine": {
|
|
606
|
+
"signature": "array_combine(array $keys, array $values): array",
|
|
607
|
+
"description": "Creates an array by using one array for keys and another for its values.",
|
|
608
|
+
"type": "function",
|
|
609
|
+
"module": "Core",
|
|
610
|
+
"parameters": [
|
|
611
|
+
{ "name": "keys", "type": "array", "description": "Array to be used as keys" },
|
|
612
|
+
{ "name": "values", "type": "array", "description": "Array to be used as values" }
|
|
613
|
+
],
|
|
614
|
+
"returns": "array"
|
|
615
|
+
},
|
|
616
|
+
"array_diff": {
|
|
617
|
+
"signature": "array_diff(array $array, array ...$arrays): array",
|
|
618
|
+
"description": "Computes the difference of arrays. Returns values in the first array that are not present in any of the other arrays.",
|
|
619
|
+
"type": "function",
|
|
620
|
+
"module": "Core",
|
|
621
|
+
"parameters": [
|
|
622
|
+
{ "name": "array", "type": "array", "description": "The array to compare from" },
|
|
623
|
+
{ "name": "arrays", "type": "array", "description": "Arrays to compare against" }
|
|
624
|
+
],
|
|
625
|
+
"returns": "array"
|
|
626
|
+
},
|
|
627
|
+
"array_intersect": {
|
|
628
|
+
"signature": "array_intersect(array $array, array ...$arrays): array",
|
|
629
|
+
"description": "Computes the intersection of arrays. Returns values present in the first array that also exist in all other arrays.",
|
|
630
|
+
"type": "function",
|
|
631
|
+
"module": "Core",
|
|
632
|
+
"parameters": [
|
|
633
|
+
{ "name": "array", "type": "array", "description": "The array to compare from" },
|
|
634
|
+
{ "name": "arrays", "type": "array", "description": "Arrays to compare against" }
|
|
635
|
+
],
|
|
636
|
+
"returns": "array"
|
|
637
|
+
},
|
|
638
|
+
"array_fill": {
|
|
639
|
+
"signature": "array_fill(int $start_index, int $count, mixed $value): array",
|
|
640
|
+
"description": "Fills an array with the specified value, starting at the given index for a specified number of entries.",
|
|
641
|
+
"type": "function",
|
|
642
|
+
"module": "Core",
|
|
643
|
+
"parameters": [
|
|
644
|
+
{ "name": "start_index", "type": "int", "description": "The first index of the returned array" },
|
|
645
|
+
{ "name": "count", "type": "int", "description": "Number of elements to insert" },
|
|
646
|
+
{ "name": "value", "type": "mixed", "description": "Value to use for filling" }
|
|
647
|
+
],
|
|
648
|
+
"returns": "array"
|
|
649
|
+
},
|
|
650
|
+
"compact": {
|
|
651
|
+
"signature": "compact(array|string $var_name, array|string ...$var_names): array",
|
|
652
|
+
"description": "Creates an array containing variables and their values from the current symbol table.",
|
|
653
|
+
"type": "function",
|
|
654
|
+
"module": "Core",
|
|
655
|
+
"parameters": [
|
|
656
|
+
{ "name": "var_name", "type": "array|string", "description": "Variable name or array of variable names" },
|
|
657
|
+
{ "name": "var_names", "type": "array|string", "description": "Additional variable names" }
|
|
658
|
+
],
|
|
659
|
+
"returns": "array"
|
|
660
|
+
},
|
|
661
|
+
"range": {
|
|
662
|
+
"signature": "range(string|int|float $start, string|int|float $end, int|float $step = 1): array",
|
|
663
|
+
"description": "Creates an array containing a range of elements from start to end.",
|
|
664
|
+
"type": "function",
|
|
665
|
+
"module": "Core",
|
|
666
|
+
"parameters": [
|
|
667
|
+
{ "name": "start", "type": "string|int|float", "description": "First value of the sequence" },
|
|
668
|
+
{ "name": "end", "type": "string|int|float", "description": "Ending value of the sequence" },
|
|
669
|
+
{ "name": "step", "type": "int|float", "description": "Increment between elements" }
|
|
670
|
+
],
|
|
671
|
+
"returns": "array"
|
|
672
|
+
},
|
|
673
|
+
"json_encode": {
|
|
674
|
+
"signature": "json_encode(mixed $value, int $flags = 0, int $depth = 512): string|false",
|
|
675
|
+
"description": "Returns the JSON representation of a value.",
|
|
676
|
+
"type": "function",
|
|
677
|
+
"module": "json",
|
|
678
|
+
"parameters": [
|
|
679
|
+
{ "name": "value", "type": "mixed", "description": "The value being encoded" },
|
|
680
|
+
{ "name": "flags", "type": "int", "description": "Bitmask of JSON_* constants" },
|
|
681
|
+
{ "name": "depth", "type": "int", "description": "Maximum depth; must be greater than zero" }
|
|
682
|
+
],
|
|
683
|
+
"returns": "string|false"
|
|
684
|
+
},
|
|
685
|
+
"json_decode": {
|
|
686
|
+
"signature": "json_decode(string $json, ?bool $associative = null, int $depth = 512, int $flags = 0): mixed",
|
|
687
|
+
"description": "Decodes a JSON string. When associative is true, JSON objects are returned as associative arrays.",
|
|
688
|
+
"type": "function",
|
|
689
|
+
"module": "json",
|
|
690
|
+
"parameters": [
|
|
691
|
+
{ "name": "json", "type": "string", "description": "The JSON string being decoded" },
|
|
692
|
+
{ "name": "associative", "type": "?bool", "description": "true = arrays, false/null = objects" },
|
|
693
|
+
{ "name": "depth", "type": "int", "description": "Maximum nesting depth" },
|
|
694
|
+
{ "name": "flags", "type": "int", "description": "Bitmask of JSON_* constants" }
|
|
695
|
+
],
|
|
696
|
+
"returns": "mixed"
|
|
697
|
+
},
|
|
698
|
+
"file_get_contents": {
|
|
699
|
+
"signature": "file_get_contents(string $filename, bool $use_include_path = false, ?resource $context = null, int $offset = 0, ?int $length = null): string|false",
|
|
700
|
+
"description": "Reads entire file into a string. Preferred way to read file contents. Supports HTTP/HTTPS URLs when allow_url_fopen is enabled.",
|
|
701
|
+
"type": "function",
|
|
702
|
+
"module": "Core",
|
|
703
|
+
"parameters": [
|
|
704
|
+
{ "name": "filename", "type": "string", "description": "Name of the file to read" },
|
|
705
|
+
{ "name": "use_include_path", "type": "bool", "description": "Search in include_path" },
|
|
706
|
+
{ "name": "context", "type": "?resource", "description": "Stream context resource" },
|
|
707
|
+
{ "name": "offset", "type": "int", "description": "Offset where reading starts" },
|
|
708
|
+
{ "name": "length", "type": "?int", "description": "Maximum bytes to read" }
|
|
709
|
+
],
|
|
710
|
+
"returns": "string|false"
|
|
711
|
+
},
|
|
712
|
+
"file_put_contents": {
|
|
713
|
+
"signature": "file_put_contents(string $filename, mixed $data, int $flags = 0, ?resource $context = null): int|false",
|
|
714
|
+
"description": "Writes data to a file. Equivalent to fopen(), fwrite(), and fclose() successively. Use FILE_APPEND to append.",
|
|
715
|
+
"type": "function",
|
|
716
|
+
"module": "Core",
|
|
717
|
+
"parameters": [
|
|
718
|
+
{ "name": "filename", "type": "string", "description": "Path to the file to write" },
|
|
719
|
+
{ "name": "data", "type": "mixed", "description": "The data to write (string, array, or stream resource)" },
|
|
720
|
+
{ "name": "flags", "type": "int", "description": "FILE_APPEND, LOCK_EX, or combination" },
|
|
721
|
+
{ "name": "context", "type": "?resource", "description": "Stream context resource" }
|
|
722
|
+
],
|
|
723
|
+
"returns": "int|false"
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
}
|