Skip to content

Commit c231bbb

Browse files
committed
Remove restore_include_path()
Closes phpGH-5189
1 parent fb57ae9 commit c231bbb

File tree

5 files changed

+5
-37
lines changed

5 files changed

+5
-37
lines changed

ext/standard/basic_functions.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,6 @@ static const zend_function_entry basic_functions[] = { /* {{{ */
434434
PHP_FE(ini_restore, arginfo_ini_restore)
435435
PHP_FE(get_include_path, arginfo_get_include_path)
436436
PHP_FE(set_include_path, arginfo_set_include_path)
437-
PHP_DEP_FE(restore_include_path, arginfo_restore_include_path)
438437

439438
PHP_FE(setcookie, arginfo_setcookie)
440439
PHP_FE(setrawcookie, arginfo_setrawcookie)
@@ -2978,20 +2977,6 @@ PHP_FUNCTION(get_include_path)
29782977
}
29792978
/* }}} */
29802979

2981-
/* {{{ proto void restore_include_path()
2982-
Restore the value of the include_path configuration option */
2983-
PHP_FUNCTION(restore_include_path)
2984-
{
2985-
zend_string *key;
2986-
2987-
ZEND_PARSE_PARAMETERS_NONE();
2988-
2989-
key = zend_string_init("include_path", sizeof("include_path")-1, 0);
2990-
zend_restore_ini_entry(key, PHP_INI_STAGE_RUNTIME);
2991-
zend_string_efree(key);
2992-
}
2993-
/* }}} */
2994-
29952980
/* {{{ proto mixed print_r(mixed var [, bool return])
29962981
Prints out or returns information about the specified variable */
29972982
PHP_FUNCTION(print_r)

ext/standard/basic_functions.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ PHP_FUNCTION(ini_set);
9494
PHP_FUNCTION(ini_restore);
9595
PHP_FUNCTION(get_include_path);
9696
PHP_FUNCTION(set_include_path);
97-
PHP_FUNCTION(restore_include_path);
9897

9998
PHP_FUNCTION(print_r);
10099
PHP_FUNCTION(fprintf);

ext/standard/basic_functions.stub.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,6 @@ function set_include_path(string $include_path): string|false {}
336336

337337
function get_include_path(): string|false {}
338338

339-
function restore_include_path(): void {}
340-
341339
/** @param mixed $var */
342340
function print_r($var, bool $return = false): string|bool {}
343341

ext/standard/basic_functions_arginfo.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,8 +508,6 @@ ZEND_END_ARG_INFO()
508508

509509
#define arginfo_get_include_path arginfo_ob_get_flush
510510

511-
#define arginfo_restore_include_path arginfo_flush
512-
513511
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_print_r, 0, 1, MAY_BE_STRING|MAY_BE_BOOL)
514512
ZEND_ARG_INFO(0, var)
515513
ZEND_ARG_TYPE_INFO(0, return, _IS_BOOL, 0)

ext/standard/tests/general_functions/include_path.phpt

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,58 +6,46 @@ include_path=.
66
<?php
77

88
var_dump(get_include_path());
9-
10-
var_dump(restore_include_path());
9+
var_dump(ini_restore("include_path"));
1110

1211
var_dump(set_include_path("var"));
1312
var_dump(get_include_path());
1413

15-
var_dump(restore_include_path());
14+
var_dump(ini_restore("include_path"));
1615
var_dump(get_include_path());
1716

1817
var_dump(set_include_path(".:/path/to/dir"));
1918
var_dump(get_include_path());
2019

21-
var_dump(restore_include_path());
20+
var_dump(ini_restore("include_path"));
2221
var_dump(get_include_path());
2322

2423
var_dump(set_include_path(""));
2524
var_dump(get_include_path());
2625

27-
var_dump(restore_include_path());
26+
var_dump(ini_restore("include_path"));
2827
var_dump(get_include_path());
2928

30-
var_dump(restore_include_path());
29+
var_dump(ini_restore("include_path"));
3130
var_dump(get_include_path());
3231

33-
3432
echo "Done\n";
3533
?>
3634
--EXPECTF--
3735
string(1) "."
38-
39-
Deprecated: Function restore_include_path() is deprecated in %s on line %d
4036
NULL
4137
string(1) "."
4238
string(3) "var"
43-
44-
Deprecated: Function restore_include_path() is deprecated in %s on line %d
4539
NULL
4640
string(1) "."
4741
string(1) "."
4842
string(14) ".:/path/to/dir"
49-
50-
Deprecated: Function restore_include_path() is deprecated in %s on line %d
5143
NULL
5244
string(1) "."
5345
bool(false)
5446
string(1) "."
55-
56-
Deprecated: Function restore_include_path() is deprecated in %s on line %d
5747
NULL
5848
string(1) "."
59-
60-
Deprecated: Function restore_include_path() is deprecated in %s on line %d
6149
NULL
6250
string(1) "."
6351
Done

0 commit comments

Comments
 (0)