1--TEST--
2Call to date function from a method and call to date method from call_user_func
3--INI--
4date.timezone=UTC
5--FILE--
6<?php
7
8class Date {
9    public function __construct($in) {
10        $this->date = date_create($in);
11    }
12
13    public function getYear1() {
14        return date_format($this->date, 'Y');
15    }
16
17    public function getYear2() {
18        return call_user_func([$this->date, 'format'], 'Y');
19    }
20}
21
22$d = new Date('NOW');
23var_dump($d->getYear1());
24var_dump($d->getYear2());
25
26?>
27--EXPECTF--
28string(4) "%d"
29string(4) "%d"
30