xref: /PHP-7.4/ext/opcache/tests/bug75357.phpt (revision 76827e39)
1--TEST--
2Bug #75357 (segfault loading WordPress wp-admin)
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.optimization_level=-1
7--SKIPIF--
8<?php require_once('skipif.inc'); ?>
9--FILE--
10<?php
11
12function wp_slash( $value ) {
13	if ( is_array( $value ) ) {
14		foreach ( $value as $k => $v ) {
15			if ( is_array( $v ) ) {
16				$value[$k] = wp_slash( $v );
17			} else {
18				$value[$k] = addslashes( $v );
19			}
20		}
21	} else {
22		$value = addslashes( $value );
23	}
24
25	return $value;
26}
27
28function addslashes_gpc($gpc) {
29	return wp_slash($gpc);
30}
31
32var_dump(addslashes_gpc(array(array("test"))));
33?>
34--EXPECT--
35array(1) {
36  [0]=>
37  array(1) {
38    [0]=>
39    string(4) "test"
40  }
41}
42