-
Notifications
You must be signed in to change notification settings - Fork 212
/
PHP.php
3312 lines (3186 loc) · 116 KB
/
PHP.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
// 8.3 https://www.php.net/
// https://wiki.php.net/rfc
// https://php.watch/versions
//! keywords =======================================================
// https://www.php.net/manual/en/reserved.keywords.php
__halt_compiler()
abstract and array() as
break
case catch class clone const continue
declare() default die() do
echo else elseif empty()
enddeclare endfor endforeach endif endswitch endwhile
eval() exit() extends
final finally fn for foreach function
global goto
if implements include include_once instanceof insteadof interface isset()
list()
match
namespace new
or
print private protected public
readonly require require_once return
static switch
throw trait try
unset() use
var
while
xor
yield from
enum
true false null
//! type =======================================================
// https://www.php.net/manual/en/language.types.intro.php
// https://www.php.net/manual/en/reserved.other-reserved-words.php
bool int float double string array object callable iterable resource numeric
// https://www.php.net/manual/en/language.types.declarations.php
// Single types
self parent array callable bool float int string iterable object mixed
// Return only types
void never static
// https://www.php.net/manual/en/language.types.type-juggling.php
int integer bool boolean float double real string array object unset
//! Predefined Variable =======================================================
// https://www.php.net/manual/en/language.variables.basics.php
$this
// https://www.php.net/manual/en/reserved.variables.php
$GLOBALS $_SERVER $_GET $_POST $_FILES $_REQUEST $_SESSION $_ENV $_COOKIE
$http_response_header
$argc
$argv
// Indices for $_SERVER
{
PHP_SELF
argv
argc
GATEWAY_INTERFACE
SERVER_ADDR
SERVER_NAME
SERVER_SOFTWARE
SERVER_PROTOCOL
REQUEST_METHOD
REQUEST_TIME
REQUEST_TIME_FLOAT
QUERY_STRING
DOCUMENT_ROOT
HTTP_ACCEPT
HTTP_ACCEPT_CHARSET
HTTP_ACCEPT_ENCODING
HTTP_ACCEPT_LANGUAGE
HTTP_CONNECTION
HTTP_HOST
HTTP_REFERER
HTTP_USER_AGENT
HTTPS
REMOTE_ADDR
REMOTE_HOST
REMOTE_PORT
REMOTE_USER
REDIRECT_REMOTE_USER
SCRIPT_FILENAME
SERVER_ADMIN
SERVER_PORT
SERVER_SIGNATURE
PATH_TRANSLATED
SCRIPT_NAME
REQUEST_URI
PHP_AUTH_DIGEST
PHP_AUTH_USER
PHP_AUTH_PW
AUTH_TYPE
PATH_INFO
ORIG_PATH_INFO
}
//! api =======================================================
{ // PHP Core
// Magic constant
// https://www.php.net/manual/en/language.constants.magic.php
__LINE__
__FILE__
__DIR__
__FUNCTION__
__CLASS__
__TRAIT__
__METHOD__
__NAMESPACE__
// Predefined constant
// https://www.php.net/manual/en/reserved.constants.php
__COMPILER_HALT_OFFSET__
PHP_VERSION
PHP_MAJOR_VERSION
PHP_MINOR_VERSION
PHP_RELEASE_VERSION
PHP_VERSION_ID
PHP_EXTRA_VERSION
PHP_ZTS
PHP_DEBUG
PHP_MAXPATHLEN
PHP_OS
PHP_OS_FAMILY
PHP_SAPI
PHP_EOL
PHP_INT_MAX
PHP_INT_MIN
PHP_INT_SIZE
PHP_FLOAT_DIG
PHP_FLOAT_EPSILON
PHP_FLOAT_MIN
PHP_FLOAT_MAX
DEFAULT_INCLUDE_PATH
PEAR_INSTALL_DIR
PEAR_EXTENSION_DIR
PHP_EXTENSION_DIR
PHP_PREFIX
PHP_BINDIR
PHP_BINARY
PHP_MANDIR
PHP_LIBDIR
PHP_DATADIR
PHP_SYSCONFDIR
PHP_LOCALSTATEDIR
PHP_CONFIG_FILE_PATH
PHP_CONFIG_FILE_SCAN_DIR
PHP_SHLIB_SUFFIX
PHP_FD_SETSIZE
PHP_WINDOWS_EVENT_CTRL_C
PHP_WINDOWS_EVENT_CTRL_BREAK
// Magic Method
// https://www.php.net/manual/en/language.oop5.magic.php
__construct()
__destruct()
__call()
__callStatic()
__get()
__set()
__isset()
__unset()
__sleep()
__wakeup()
__serialize()
__unserialize()
__toString()
__invoke()
__set_state()
__clone()
__debugInfo()
// Predefined Interfaces and Classes
class stdClass {}
class __PHP_Incomplete_Class {}
// https://www.php.net/manual/en/reserved.interfaces.php
interface Traversable {}
interface Iterator extends Traversable {
public current(): mixed
public key(): mixed
public next(): void
public rewind(): void
public valid(): bool
}
interface IteratorAggregate extends Traversable {
public getIterator(): Traversable
}
interface Throwable extends Stringable {
public getMessage(): string
public getCode(): int
public getFile(): string
public getLine(): int
public getTrace(): array
public getTraceAsString(): string
public getPrevious(): ?Throwable
abstract public __toString(): string
}
interface ArrayAccess {
public offsetExists(mixed $offset): bool
public offsetGet(mixed $offset): mixed
public offsetSet(mixed $offset, mixed $value): void
public offsetUnset(mixed $offset): void
}
interface Serializable {
public serialize(): ?string
public unserialize(string $data): void
}
final class Closure {
public static bind(Closure $closure, ?object $newThis, object|string|null $newScope = "static"): ?Closure
public bindTo(?object $newThis, object|string|null $newScope = "static"): ?Closure
public call(object $newThis, mixed ...$args): mixed
public static fromCallable(callable $callback): Closure
}
final class Generator implements Iterator {
public current(): mixed
public getReturn(): mixed
public key(): mixed
public next(): void
public rewind(): void
public send(mixed $value): mixed
public throw(Throwable $exception): mixed
public valid(): bool
public __wakeup(): void
}
final class Fiber {
public __construct(callable $callback)
public start(mixed ...$args): mixed
public resume(mixed $value = null): mixed
public throw(Throwable $exception): mixed
public getReturn(): mixed
public isStarted(): bool
public isSuspended(): bool
public isRunning(): bool
public isTerminated(): bool
public static suspend(mixed $value = null): mixed
public static getCurrent(): ?Fiber
}
final class WeakReference {
public static create(object $object): WeakReference
public get(): ?object
}
final class WeakMap implements ArrayAccess, Countable, IteratorAggregate {
public count(): int
public getIterator(): Iterator
public offsetExists(object $object): bool
public offsetGet(object $object): mixed
public offsetSet(object $object, mixed $value): void
public offsetUnset(object $object): void
}
interface Stringable {
public __toString(): string
}
interface UnitEnum {
public static cases(): array
}
interface BackedEnum extends UnitEnum {
public static from(int|string $value): static
public static tryFrom(int|string $value): ?static
}
// Predefined Exceptions
// https://www.php.net/manual/en/reserved.exceptions.php
class Exception implements Throwable {}
class ErrorException extends Exception {
final public getSeverity(): int
}
class Error implements Throwable {}
class ArithmeticError extends Error {}
class DivisionByZeroError extends ArithmeticError {}
class AssertionError extends Error {}
class CompileError extends Error {}
class ParseError extends CompileError {}
class TypeError extends Error {}
class ArgumentCountError extends TypeError {}
class ValueError extends Error {}
class UnhandledMatchError extends Error {}
final class FiberError extends Error {}
}
{ // Affecting PHP's Behaviour
{ // Error Handling and Logging
E_ERROR
E_WARNING
E_PARSE
E_NOTICE
E_CORE_ERROR
E_CORE_WARNING
E_COMPILE_ERROR
E_COMPILE_WARNING
E_USER_ERROR
E_USER_WARNING
E_USER_NOTICE
E_STRICT
E_RECOVERABLE_ERROR
E_DEPRECATED
E_USER_DEPRECATED
E_ALL
DEBUG_BACKTRACE_PROVIDE_OBJECT
DEBUG_BACKTRACE_IGNORE_ARGS
debug_backtrace(int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT, int $limit = 0): array
debug_print_backtrace(int $options = 0, int $limit = 0): void
error_clear_last(): void
error_get_last(): ?array
error_log(string $message, int $message_type = 0, ?string $destination = null, ?string $additional_headers = null): bool
error_reporting(?int $error_level = null): int
restore_error_handler(): bool
restore_exception_handler(): bool
set_error_handler(?callable $callback, int $error_levels = E_ALL): ?callable
set_exception_handler(?callable $callback): ?callable
trigger_error(string $message, int $error_level = E_USER_NOTICE): bool
user_error()
}
{ // Output Buffering Control
PHP_OUTPUT_HANDLER_START
PHP_OUTPUT_HANDLER_WRITE
PHP_OUTPUT_HANDLER_FLUSH
PHP_OUTPUT_HANDLER_CLEAN
PHP_OUTPUT_HANDLER_FINAL
PHP_OUTPUT_HANDLER_CONT
PHP_OUTPUT_HANDLER_END
PHP_OUTPUT_HANDLER_CLEANABLE
PHP_OUTPUT_HANDLER_FLUSHABLE
PHP_OUTPUT_HANDLER_REMOVABLE
PHP_OUTPUT_HANDLER_STDFLAGS
flush(): void
ob_clean(): bool
ob_end_clean(): bool
ob_end_flush(): bool
ob_flush(): bool
ob_get_clean(): string|false
ob_get_contents(): string|false
ob_get_flush(): string|false
ob_get_length(): int|false
ob_get_level(): int
ob_get_status(bool $full_status = false): array
ob_gzhandler(string $data, int $flags): string|false
ob_implicit_flush(bool $enable = true): void
ob_list_handlers(): array
ob_start(callable $callback = null, int $chunk_size = 0, int $flags = PHP_OUTPUT_HANDLER_STDFLAGS): bool
output_add_rewrite_var(string $name, string $value): bool
output_reset_rewrite_vars(): bool
}
{ // PHP Options and Information
// phpcredits()
CREDITS_GROUP
CREDITS_GENERAL
CREDITS_SAPI
CREDITS_MODULES
CREDITS_DOCS
CREDITS_FULLPAGE
CREDITS_QA
CREDITS_ALL
// phpinfo()
INFO_GENERAL
INFO_CREDITS
INFO_CONFIGURATION
INFO_MODULES
INFO_ENVIRONMENT
INFO_VARIABLES
INFO_LICENSE
INFO_ALL
// INI
INI_USER
INI_PERDIR
INI_SYSTEM
INI_ALL
// assert()
ASSERT_ACTIVE
ASSERT_CALLBACK
ASSERT_BAIL
ASSERT_WARNING
ASSERT_QUIET_EVAL
// Windows
PHP_WINDOWS_VERSION_MAJOR
PHP_WINDOWS_VERSION_MINOR
PHP_WINDOWS_VERSION_BUILD
PHP_WINDOWS_VERSION_PLATFORM
PHP_WINDOWS_VERSION_SP_MAJOR
PHP_WINDOWS_VERSION_SP_MINOR
PHP_WINDOWS_VERSION_SUITEMASK
PHP_WINDOWS_VERSION_PRODUCTTYPE
PHP_WINDOWS_NT_DOMAIN_CONTROLLER
PHP_WINDOWS_NT_SERVER
PHP_WINDOWS_NT_WORKSTATION
assert_options(int $what, mixed $value = ?): mixed
assert(mixed $assertion, string $description = ?): bool
assert(mixed $assertion, Throwable $exception = ?): bool
cli_get_process_title(): ?string
cli_set_process_title(string $title): bool
extension_loaded(string $extension): bool
gc_collect_cycles(): int
gc_disable(): void
gc_enable(): void
gc_enabled(): bool
gc_mem_caches(): int
gc_status(): array
get_cfg_var(string $option): string|array|false
get_current_user(): string
get_defined_constants(bool $categorize = false): array
get_extension_funcs(string $extension): array|false
get_include_path(): string|false
get_included_files(): array
get_loaded_extensions(bool $zend_extensions = false): array
get_required_files()
get_resources(?string $type = null): array
getenv(string $varname, bool $local_only = false): string|false
getenv(): array
getlastmod(): int|false
getmygid(): int|false
getmyinode(): int|false
getmypid(): int|false
getmyuid(): int|false
getopt(string $short_options, array $long_options = [], int &$rest_index = null): array|false
getrusage(int $mode = 0): array|false
ini_alter()
ini_get_all(?string $extension = null, bool $details = true): array|false
ini_get(string $option): string|false
ini_restore(string $option): void
ini_parse_quantity(string $shorthand): int
ini_set(string $option, string|int|float|bool|null $value): string|false
memory_get_peak_usage(bool $real_usage = false): int
memory_get_usage(bool $real_usage = false): int
memory_reset_peak_usage(): void
php_ini_loaded_file(): string|false
php_ini_scanned_files(): string|false
php_sapi_name(): string|false
php_uname(string $mode = "a"): string
phpcredits(int $flags = CREDITS_ALL): bool
phpinfo(int $flags = INFO_ALL): bool
phpversion(?string $extension = null): string|false
putenv(string $assignment): bool
set_include_path(string $include_path): string|false
set_time_limit(int $seconds): bool
sys_get_temp_dir(): string
version_compare(string $version1, string $version2, ?string $operator = null): int|bool
zend_thread_id(): int
zend_version(): string
}
}
{ // Cryptography Extensions
{ // CSPRNG
random_bytes(int $length): string
random_int(int $min, int $max): int
}
{ // HASH Message Digest Framework
HASH_HMAC
final class HashContext {
public __serialize(): array
public __unserialize(array $data): void
}
hash_algos(): array
hash_copy(HashContext $context): HashContext
hash_equals(string $known_string, string $user_string): bool
hash_file(string $algo, string $filename, bool $binary = false, array $options = []): string|false
hash_final(HashContext $context, bool $binary = false): string
hash_hkdf(string $algo, string $key, int $length = 0, string $info = "", string $salt = ""): string
hash_hmac_algos(): array
hash_hmac_file(string $algo, string $filename, string $key, bool $binary = false): string|false
hash_hmac(string $algo, string $data, string $key, bool $binary = false): string
hash_init(string $algo, int $flags = 0, string $key = "", array $options = []): HashContext
hash_pbkdf2(string $algo, string $password, string $salt, int $iterations, int $length = 0, bool $binary = false): string
hash_update_file(HashContext $context, string $filename, ?resource $stream_context = null): bool
hash_update_stream(HashContext $context, resource $stream, int $length = -1): int
hash_update(HashContext $context, string $data): bool
hash(string $algo, string $data, bool $binary = false, array $options = []): string
}
{ // Password Hashing
PASSWORD_BCRYPT
PASSWORD_ARGON2I
PASSWORD_ARGON2ID
PASSWORD_ARGON2_DEFAULT_MEMORY_COST
PASSWORD_ARGON2_DEFAULT_TIME_COST
PASSWORD_ARGON2_DEFAULT_THREADS
PASSWORD_DEFAULT
password_algos(): array
password_get_info(string $hash): array
password_hash(string $password, string|int|null $algo, array $options = []): string
password_needs_rehash(string $hash, string|int|null $algo, array $options = []): bool
password_verify(string $password, string $hash): bool
}
}
{ // Database Extensions
{ // PHP Data Objects
class PDO {
const int PARAM_BOOL;
const int PARAM_NULL;
const int PARAM_INT;
const int PARAM_STR;
const int PARAM_STR_NATL;
const int PARAM_STR_CHAR;
const int PARAM_LOB;
const int PARAM_STMT;
const int PARAM_INPUT_OUTPUT;
const int FETCH_DEFAULT;
const int FETCH_LAZY;
const int FETCH_ASSOC;
const int FETCH_NAMED;
const int FETCH_NUM;
const int FETCH_BOTH ;
const int FETCH_OBJ;
const int FETCH_BOUND;
const int FETCH_COLUMN;
const int FETCH_CLASS;
const int FETCH_INTO;
const int FETCH_FUNC;
const int FETCH_GROUP;
const int FETCH_UNIQUE;
const int FETCH_KEY_PAIR;
const int FETCH_CLASSTYPE;
const int FETCH_SERIALIZE;
const int FETCH_PROPS_LATE;
const int ATTR_AUTOCOMMIT;
const int ATTR_PREFETCH;
const int ATTR_TIMEOUT;
const int ATTR_ERRMODE;
const int ATTR_SERVER_VERSION;
const int ATTR_CLIENT_VERSION;
const int ATTR_SERVER_INFO;
const int ATTR_CONNECTION_STATUS;
const int ATTR_CASE;
const int ATTR_CURSOR_NAME;
const int ATTR_CURSOR;
const int ATTR_DRIVER_NAME;
const int ATTR_ORACLE_NULLS;
const int ATTR_PERSISTENT;
const int ATTR_STATEMENT_CLASS;
const int ATTR_FETCH_CATALOG_NAMES;
const int ATTR_FETCH_TABLE_NAMES ;
const int ATTR_STRINGIFY_FETCHES;
const int ATTR_MAX_COLUMN_LEN;
const int ATTR_DEFAULT_FETCH_MODE;
const int ATTR_EMULATE_PREPARES;
const int ATTR_DEFAULT_STR_PARAM;
const int ERRMODE_SILENT;
const int ERRMODE_WARNING;
const int ERRMODE_EXCEPTION;
const int CASE_NATURAL;
const int CASE_UPPER;
const int NULL_NATURAL;
const int NULL_EMPTY_STRING;
const int NULL_TO_STRING;
const int FETCH_ORI_NEXT;
const int FETCH_ORI_PRIOR;
const int FETCH_ORI_FIRST;
const int FETCH_ORI_LAST;
const int FETCH_ORI_ABS;
const int FETCH_ORI_REL;
const int CURSOR_FWDONLY;
const int CURSOR_SCROLL;
const string ERR_NONE;
const int PARAM_EVT_ALLOC;
const int PARAM_EVT_FREE;
const int PARAM_EVT_EXEC_PRE;
const int PARAM_EVT_EXEC_POST;
const int PARAM_EVT_FETCH_PRE;
const int PARAM_EVT_FETCH_POST;
const int PARAM_EVT_NORMALIZE;
const int SQLITE_DETERMINISTIC;
public __construct(string $dsn, ?string $username = null, ?string $password = null, ?array $options = null)
public beginTransaction(): bool
public commit(): bool
public errorCode(): ?string
public errorInfo(): array
public exec(string $statement): int|false
public getAttribute(int $attribute): mixed
public static getAvailableDrivers(): array
public inTransaction(): bool
public lastInsertId(?string $name = null): string|false
public prepare(string $query, array $options = []): PDOStatement|false
public query(string $query, ?int $fetchMode = null): PDOStatement|false
public query(string $query, ?int $fetchMode = PDO::FETCH_COLUMN, int $colno): PDOStatement|false
public query(string $query, ?int $fetchMode = PDO::FETCH_CLASS, string $classname, array $constructorArgs): PDOStatement|false
public query(string $query, ?int $fetchMode = PDO::FETCH_INTO, object $object): PDOStatement|false
public quote(string $string, int $type = PDO::PARAM_STR): string|false
public rollBack(): bool
public setAttribute(int $attribute, mixed $value): bool
}
class PDOStatement implements IteratorAggregate {
public string $queryString;
public bindColumn(string|int $column, mixed &$var, int $type = PDO::PARAM_STR, int $maxLength = 0, mixed $driverOptions = null): bool
public bindParam(string|int $param, mixed &$var, int $type = PDO::PARAM_STR, int $maxLength = 0, mixed $driverOptions = null): bool
public bindValue(string|int $param, mixed $value, int $type = PDO::PARAM_STR): bool
public closeCursor(): bool
public columnCount(): int
public debugDumpParams(): ?bool
public errorCode(): ?string
public errorInfo(): array
public execute(?array $params = null): bool
public fetch(int $mode = PDO::FETCH_DEFAULT, int $cursorOrientation = PDO::FETCH_ORI_NEXT, int $cursorOffset = 0): mixed
public fetchAll(int $mode = PDO::FETCH_DEFAULT): array
public fetchAll(int $mode = PDO::FETCH_COLUMN, int $column): array
public fetchAll(int $mode = PDO::FETCH_CLASS, string $class, ?array $constructorArgs): array
public fetchAll(int $mode = PDO::FETCH_FUNC, callable $callback): array
public fetchColumn(int $column = 0): mixed
public fetchObject(?string $class = "stdClass", array $constructorArgs = []): object|false
public getAttribute(int $name): mixed
public getColumnMeta(int $column): array|false
public getIterator(): Iterator
public nextRowset(): bool
public rowCount(): int
public setAttribute(int $attribute, mixed $value): bool
public setFetchMode(int $mode): bool
public setFetchMode(int $mode = PDO::FETCH_COLUMN, int $colno): bool
public setFetchMode(int $mode = PDO::FETCH_CLASS, string $class, ?array $constructorArgs = null): bool
public setFetchMode(int $mode = PDO::FETCH_INTO, object $object): bool
}
class PDOException extends RuntimeException {
protected int|string $code;
public ?array $errorInfo = null;
}
}
{ // MySQL Improved Extension
MYSQLI_READ_DEFAULT_GROUP
MYSQLI_READ_DEFAULT_FILE
MYSQLI_OPT_CONNECT_TIMEOUT
MYSQLI_OPT_READ_TIMEOUT
MYSQLI_OPT_LOCAL_INFILE
MYSQLI_OPT_INT_AND_FLOAT_NATIVE
MYSQLI_OPT_NET_CMD_BUFFER_SIZE
MYSQLI_OPT_NET_READ_BUFFER_SIZE
MYSQLI_OPT_SSL_VERIFY_SERVER_CERT
MYSQLI_INIT_COMMAND
MYSQLI_CLIENT_SSL
MYSQLI_CLIENT_COMPRESS
MYSQLI_CLIENT_INTERACTIVE
MYSQLI_CLIENT_IGNORE_SPACE
MYSQLI_CLIENT_NO_SCHEMA
MYSQLI_CLIENT_MULTI_QUERIES
MYSQLI_STORE_RESULT
MYSQLI_USE_RESULT
MYSQLI_ASSOC
MYSQLI_NUM
MYSQLI_BOTH
MYSQLI_NOT_NULL_FLAG
MYSQLI_PRI_KEY_FLAG
MYSQLI_UNIQUE_KEY_FLAG
MYSQLI_MULTIPLE_KEY_FLAG
MYSQLI_BLOB_FLAG
MYSQLI_UNSIGNED_FLAG
MYSQLI_ZEROFILL_FLAG
MYSQLI_AUTO_INCREMENT_FLAG
MYSQLI_TIMESTAMP_FLAG
MYSQLI_SET_FLAG
MYSQLI_NUM_FLAG
MYSQLI_PART_KEY_FLAG
MYSQLI_GROUP_FLAG
MYSQLI_TYPE_DECIMAL
MYSQLI_TYPE_NEWDECIMAL
MYSQLI_TYPE_BIT
MYSQLI_TYPE_TINY
MYSQLI_TYPE_SHORT
MYSQLI_TYPE_LONG
MYSQLI_TYPE_FLOAT
MYSQLI_TYPE_DOUBLE
MYSQLI_TYPE_NULL
MYSQLI_TYPE_TIMESTAMP
MYSQLI_TYPE_LONGLONG
MYSQLI_TYPE_INT24
MYSQLI_TYPE_DATE
MYSQLI_TYPE_TIME
MYSQLI_TYPE_DATETIME
MYSQLI_TYPE_YEAR
MYSQLI_TYPE_NEWDATE
MYSQLI_TYPE_INTERVAL
MYSQLI_TYPE_ENUM
MYSQLI_TYPE_SET
MYSQLI_TYPE_TINY_BLOB
MYSQLI_TYPE_MEDIUM_BLOB
MYSQLI_TYPE_LONG_BLOB
MYSQLI_TYPE_BLOB
MYSQLI_TYPE_VAR_STRING
MYSQLI_TYPE_STRING
MYSQLI_TYPE_CHAR
MYSQLI_TYPE_GEOMETRY
MYSQLI_TYPE_JSON
MYSQLI_NEED_DATA
MYSQLI_NO_DATA
MYSQLI_DATA_TRUNCATED
MYSQLI_ENUM_FLAG
MYSQLI_BINARY_FLAG
MYSQLI_CURSOR_TYPE_FOR_UPDATE
MYSQLI_CURSOR_TYPE_NO_CURSOR
MYSQLI_CURSOR_TYPE_READ_ONLY
MYSQLI_CURSOR_TYPE_SCROLLABLE
MYSQLI_STMT_ATTR_CURSOR_TYPE
MYSQLI_STMT_ATTR_PREFETCH_ROWS
MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH
MYSQLI_SET_CHARSET_NAME
MYSQLI_REPORT_INDEX
MYSQLI_REPORT_ERROR
MYSQLI_REPORT_STRICT
MYSQLI_REPORT_ALL
MYSQLI_REPORT_OFF
MYSQLI_DEBUG_TRACE_ENABLED
MYSQLI_SERVER_QUERY_NO_GOOD_INDEX_USED
MYSQLI_SERVER_QUERY_NO_INDEX_USED
MYSQLI_SERVER_PUBLIC_KEY
MYSQLI_REFRESH_GRANT
MYSQLI_REFRESH_LOG
MYSQLI_REFRESH_TABLES
MYSQLI_REFRESH_HOSTS
MYSQLI_REFRESH_REPLICA
MYSQLI_REFRESH_STATUS
MYSQLI_REFRESH_THREADS
MYSQLI_REFRESH_SLAVE
MYSQLI_REFRESH_MASTER
MYSQLI_TRANS_COR_AND_CHAIN
MYSQLI_TRANS_COR_AND_NO_CHAIN
MYSQLI_TRANS_COR_RELEASE
MYSQLI_TRANS_COR_NO_RELEASE
MYSQLI_TRANS_START_READ_ONLY
MYSQLI_TRANS_START_READ_WRITE
MYSQLI_TRANS_START_CONSISTENT_SNAPSHOT
MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT
MYSQLI_IS_MARIADB
class mysqli {
public int|string $affected_rows;
public string $client_info;
public int $client_version;
public int $connect_errno;
public ?string $connect_error;
public int $errno;
public string $error;
public array $error_list;
public int $field_count;
public string $host_info;
public ?string $info;
public int|string $insert_id;
public string $server_info;
public int $server_version;
public string $sqlstate;
public int $protocol_version;
public int $thread_id;
public int $warning_count;
public __construct(string $hostname =, string $username =, string $password =, string $database = "", int $port =, string $socket =)
public autocommit(bool $enable): bool
public begin_transaction(int $flags = 0, ?string $name = null): bool
public change_user(string $username, string $password, ?string $database): bool
public character_set_name(): string
public close(): bool
public commit(int $flags = 0, ?string $name = null): bool
public connect(string $hostname =, string $username =, string $password =, string $database = "", int $port =, string $socket =): void
public debug(string $options): bool
public dump_debug_info(): bool
public execute_query(string $query, ?array $params = null): mysqli_result|bool
public get_charset(): ?object
public get_client_info(): string
public get_connection_stats(): array
public get_server_info(): string
public get_warnings(): mysqli_warning|false
public kill(int $process_id): bool
public more_results(): bool
public multi_query(string $query): bool
public next_result(): bool
public options(int $option, string|int $value): bool
public ping(): bool
public static poll(?array &$read, ?array &$error, array &$reject, int $seconds, int $microseconds = 0): int|false
public prepare(string $query): mysqli_stmt|false
public query(string $query, int $result_mode = MYSQLI_STORE_RESULT): mysqli_result|bool
public real_connect(string $host = ?, string $username = ?, string $passwd = ?, string $dbname = ?, int $port = ?, string $socket = ?, int $flags = ?): bool
public real_escape_string(string $string): string
public real_query(string $query): bool
public reap_async_query(): mysqli_result|bool
public refresh(int $flags): bool
public release_savepoint(string $name): bool
public rollback(int $flags = 0, ?string $name = null): bool
public savepoint(string $name): bool
public select_db(string $database): bool
public set_charset(string $charset): bool
public ssl_set(?string $key, ?string $certificate, ?string $ca_certificate, ?string $ca_path, ?string $cipher_algos): bool
public stat(): string|false
public stmt_init(): mysqli_stmt|false
public store_result(int $mode = 0): mysqli_result|false
public thread_safe(): bool
public use_result(): mysqli_result|false
}
class mysqli_stmt {
public int|string $affected_rows;
public int|string $insert_id;
public int|string $num_rows;
public int $param_count;
public int $field_count;
public int $errno;
public string $error;
public array $error_list;
public string $sqlstate;
public int $id;
public __construct(mysqli $mysql, ?string $query = null)
public attr_get(int $attribute): int
public attr_set(int $attribute, int $value): bool
public bind_param(string $types, mixed &$var, mixed &...$vars): bool
public bind_result(mixed &$var, mixed &...$vars): bool
public close(): bool
public data_seek(int $offset): void
public execute(?array $params = null): bool
public fetch(): ?bool
public free_result(): void
public get_result(): mysqli_result|false
public get_warnings(): mysqli_warning|false
public more_results(): bool
public next_result(): bool
public num_rows(): int|string
public prepare(string $query): bool
public reset(): bool
public result_metadata(): mysqli_result|false
public send_long_data(int $param_num, string $data): bool
public store_result(): bool
}
class mysqli_result implements IteratorAggregate {
public int $current_field;
public int $field_count;
public ?array $lengths;
public int|string $num_rows;
public int $type;
public __construct(mysqli $mysql, int $result_mode = MYSQLI_STORE_RESULT)
public data_seek(int $offset): bool
public fetch_all(int $mode = MYSQLI_NUM): array
public fetch_array(int $mode = MYSQLI_BOTH): array|null|false
public fetch_assoc(): array|null|false
public fetch_column(int $column = 0): null|int|float|string|false
public fetch_field_direct(int $index): object|false
public fetch_field(): object|false
public fetch_fields(): array
public fetch_object(string $class = "stdClass", array $constructor_args = []): object|null|false
public fetch_row(): array|null|false
public field_seek(int $index): bool
public free(): void
public close(): void
public free_result(): void
public getIterator(): Iterator
}
final class mysqli_driver {
public readonly string $client_info;
public readonly int $client_version;
public readonly int $driver_version;
public readonly bool $embedded;
public bool $reconnect = false;
public int $report_mode;
}
final class mysqli_warning {
public string $message;
public string $sqlstate;
public int $errno;
public next(): bool
}
final class mysqli_sql_exception extends RuntimeException {
protected string $sqlstate = "00000";
public getSqlState(): string
}
}
{ // SQLite3
SQLITE3_ASSOC
SQLITE3_NUM
SQLITE3_BOTH
SQLITE3_INTEGER
SQLITE3_FLOAT
SQLITE3_TEXT
SQLITE3_BLOB
SQLITE3_NULL
SQLITE3_OPEN_READONLY
SQLITE3_OPEN_READWRITE
SQLITE3_OPEN_CREATE
SQLITE3_DETERMINISTIC
class SQLite3 {
public __construct(string $filename, int $flags = SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE, string $encryptionKey = "")
public backup(SQLite3 $destination, string $sourceDatabase = "main", string $destinationDatabase = "main"): bool
public busyTimeout(int $milliseconds): bool
public changes(): int
public close(): bool
public createAggregate(string $name, callable $stepCallback, callable $finalCallback, int $argCount = -1): bool
public createCollation(string $name, callable $callback): bool
public createFunction(string $name, callable $callback, int $argCount = -1, int $flags = 0): bool
public enableExceptions(bool $enable = false): bool
public static escapeString(string $string): string
public exec(string $query): bool
public lastErrorCode(): int
public lastErrorMsg(): string
public lastInsertRowID(): int
public loadExtension(string $name): bool
public open(string $filename, int $flags = SQLITE3_OPEN_READWRITE | SQLITE3_OPEN_CREATE, string $encryptionKey = ""): void
public openBlob(string $table, string $column, int $rowid, string $database = "main", int $flags = SQLITE3_OPEN_READONLY): resource|false
public prepare(string $query): SQLite3Stmt|false
public query(string $query): SQLite3Result|false
public querySingle(string $query, bool $entireRow = false): mixed
public setAuthorizer(?callable $callback): bool
public static version(): array
}
class SQLite3Stmt {
private __construct(SQLite3 $sqlite3, string $query)
public bindParam(string|int $param, mixed &$var, int $type = SQLITE3_TEXT): bool
public bindValue(string|int $param, mixed $value, int $type = SQLITE3_TEXT): bool
public clear(): bool
public close(): bool
public execute(): SQLite3Result|false
public getSQL(bool $expand = false): string|false
public paramCount(): int
public readOnly(): bool
public reset(): bool
}
class SQLite3Result {
public columnName(int $column): string|false
public columnType(int $column): int|false
public fetchArray(int $mode = SQLITE3_BOTH): array|false
public finalize(): bool
public numColumns(): int
public reset(): bool
}
}
}
{ // Date and Time Related Extensions
{ // Date and Time
SUNFUNCS_RET_TIMESTAMP
SUNFUNCS_RET_STRING
SUNFUNCS_RET_DOUBLE
class DateTime implements DateTimeInterface {
public __construct(string $datetime = "now", ?DateTimeZone $timezone = null)
public add(DateInterval $interval): DateTime
public static createFromFormat(string $format, string $datetime, ?DateTimeZone $timezone = null): DateTime|false
public static createFromImmutable(DateTimeImmutable $object): DateTime
public static createFromInterface(DateTimeInterface $object): DateTime
public static getLastErrors(): array|false
public modify(string $modifier): DateTime|false
public static __set_state(array $array): DateTime
public setDate(int $year, int $month, int $day): DateTime
public setISODate(int $year, int $week, int $dayOfWeek = 1): DateTime
public setTime(int $hour, int $minute, int $second = 0, int $microsecond = 0): DateTime
public setTimestamp(int $timestamp): DateTime
public setTimezone(DateTimeZone $timezone): DateTime
public sub(DateInterval $interval): DateTime
public diff(DateTimeInterface $targetObject, bool $absolute = false): DateInterval
public format(string $format): string
public getOffset(): int
public getTimestamp(): int
public getTimezone(): DateTimeZone|false
public __wakeup(): void
}
class DateTimeImmutable implements DateTimeInterface {
public __construct(string $datetime = "now", ?DateTimeZone $timezone = null)
public add(DateInterval $interval): DateTimeImmutable
public static createFromFormat(string $format, string $datetime, ?DateTimeZone $timezone = null): DateTimeImmutable|false
public static createFromInterface(DateTimeInterface $object): DateTimeImmutable
public static createFromMutable(DateTime $object): DateTimeImmutable
public static getLastErrors(): array|false
public modify(string $modifier): DateTimeImmutable|false
public static __set_state(array $array): DateTimeImmutable
public setDate(int $year, int $month, int $day): DateTimeImmutable
public setISODate(int $year, int $week, int $dayOfWeek = 1): DateTimeImmutable
public setTime(int $hour, int $minute, int $second = 0, int $microsecond = 0): DateTimeImmutable
public setTimestamp(int $timestamp): DateTimeImmutable
public setTimezone(DateTimeZone $timezone): DateTimeImmutable
public sub(DateInterval $interval): DateTimeImmutable
public diff(DateTimeInterface $targetObject, bool $absolute = false): DateInterval
public format(string $format): string
public getOffset(): int
public getTimestamp(): int
public getTimezone(): DateTimeZone|false
public __wakeup(): void
}
interface DateTimeInterface {
const string ATOM;
const string COOKIE;
const string ISO8601;
const string RSS;
const string W3C;
public diff(DateTimeInterface $targetObject, bool $absolute = false): DateInterval
public format(string $format): string
public getOffset(): int
public getTimestamp(): int
public getTimezone(): DateTimeZone|false