summaryrefslogtreecommitdiff
path: root/ext/standard/tests/array/bug34227.phpt
blob: 51064ae8a816220089feb3113c7d459079de858f (plain)
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
--TEST--
Bug #34277 (array_filter() crashes with references and objects)
--FILE--
<?php

class C
{
  function m1()
  {
    $this->m2();
  }

  function m2()
  {
    $this->m3();
  }

  function m3()
  {
    $this->m4();
  }

  function m4()
  {
    $this->m5();
  }

  function m5()
  {
    $this->m6();
  }

  function m6()
  {
    $this->m7();
  }

  function m7()
  {
    $this->m8();
  }

  function m8()
  {
    $this->m9();
  }

  function m9()
  {
    $this->m10();
  }

  function m10()
  {
    $this->m11(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
  }

  function m11($a1, $a2, $a3, $a4, $a5, $a6, $a7, $a8, $a9, $a10)
  {
    $arr = explode('a', 'b');
  }
}

function f($str)
{
  $obj =& new C;
  $obj->m1();
  return TRUE;
}

function p5($a1, $a2, $a3, $a4, $a5, $a6, $a7, $a8, $a9, $a10, $a11, $a12)
{
  $ret = array_filter(array(0), 'f');
}

function p4()
{
  p5(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
}

function p3()
{
  p4();
}

function p2()
{
  p3();
}

function p1()
{
  p2();
}

p1();
echo "ok\n";
?>
--EXPECT--
ok