php-internal-docs
8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
scanf.h
Go to the documentation of this file.
1
/*
2
+----------------------------------------------------------------------+
3
| Copyright (c) The PHP Group |
4
+----------------------------------------------------------------------+
5
| This source file is subject to version 3.01 of the PHP license, |
6
| that is bundled with this package in the file LICENSE, and is |
7
| available through the world-wide-web at the following url: |
8
| https://www.php.net/license/3_01.txt |
9
| If you did not receive a copy of the PHP license and are unable to |
10
| obtain it through the world-wide-web, please send a note to |
11
| license@php.net so we can mail you a copy immediately. |
12
+----------------------------------------------------------------------+
13
| Author: Clayton Collie <clcollie@mindspring.com> |
14
+----------------------------------------------------------------------+
15
*/
16
17
#ifndef SCANF_H
18
#define SCANF_H
19
20
21
#define SCAN_MAX_ARGS 0xFF
/* Maximum number of variable which can be */
22
/* passed to (f|s)scanf. This is an artificial */
23
/* upper limit to keep resources in check and */
24
/* minimize the possibility of exploits */
25
26
#define SCAN_SUCCESS SUCCESS
27
#define SCAN_ERROR_EOF -1
/* indicates premature termination of scan */
28
/* can be caused by bad parameters or format*/
29
/* string. */
30
#define SCAN_ERROR_INVALID_FORMAT (SCAN_ERROR_EOF - 1)
31
#define SCAN_ERROR_WRONG_PARAM_COUNT (SCAN_ERROR_INVALID_FORMAT - 1)
32
33
/*
34
* The following are here solely for the benefit of the scanf type functions
35
* e.g. fscanf
36
*/
37
PHPAPI
int
ValidateFormat
(
char
*format,
int
numVars,
int
*totalVars);
38
PHPAPI
int
php_sscanf_internal
(
char
*
string
,
char
*format,
int
argCount,
zval
*
args
,
39
int
varStart,
zval
*
return_value
);
40
41
42
#endif
/* SCANF_H */
PHPAPI
#define PHPAPI
Definition
php.h:71
ValidateFormat
PHPAPI int ValidateFormat(char *format, int numVars, int *totalVars)
Definition
scanf.c:307
php_sscanf_internal
PHPAPI int php_sscanf_internal(char *string, char *format, int argCount, zval *args, int varStart, zval *return_value)
Definition
scanf.c:574
zval
struct _zval_struct zval
Definition
zend_builtin_functions.h:25
args
zval * args
Definition
zend_closures.c:46
return_value
zval * return_value
Definition
zend_vm_def.h:4441
ext
standard
scanf.h
Generated on Sat Aug 23 2025 01:46:12 for php-internal-docs by
1.13.2