1--TEST--
2Extra args to parent hook call
3--FILE--
4<?php
5
6class A {
7    public $backed;
8    public $virtual { get {} set {} }
9}
10
11class B extends A {
12    public $backed {
13        get {
14            return parent::$backed::get(42);
15        }
16        set {
17            parent::$backed::set($value, 42);
18        }
19    }
20    public $virtual {
21        get {
22            return parent::$virtual::get(42);
23        }
24        set {
25            parent::$virtual::set($value, 42);
26        }
27    }
28}
29
30$b = new B();
31// Calling a parent hook with extra args is ok, because they are user functions.
32var_dump($b->virtual = 42);
33var_dump($b->virtual);
34// Calling the implicit parent hook with extra args is not ok, since it is an internal function.
35try {
36    var_dump($b->backed = 42);
37} catch (Error $e) {
38    echo $e->getMessage(), "\n";
39}
40try {
41    var_dump($b->backed);
42} catch (Error $e) {
43    echo $e->getMessage(), "\n";
44}
45
46?>
47--EXPECT--
48int(42)
49NULL
50A::$backed::set() expects exactly 1 argument, 2 given
51A::$backed::get() expects exactly 0 arguments, 1 given
52