1--TEST--
2Zend: Test zend_forbid_dynamic_call() for methods
3--EXTENSIONS--
4zend_test
5--FILE--
6<?php
7
8$object = new ZendTestForbidDynamicCall();
9$object->call();
10ZendTestForbidDynamicCall::callStatic();
11
12try {
13    $call = [$object, 'call'];
14    $call();
15} catch (Error $error) {
16    echo $error->getMessage(), "\n";
17}
18
19try {
20    $callStatic = [ZendTestForbidDynamicCall::class, 'callStatic'];
21    $callStatic();
22} catch (Error $error) {
23    echo $error->getMessage(), "\n";
24}
25
26?>
27--EXPECT--
28Cannot call ZendTestForbidDynamicCall::call() dynamically
29Cannot call ZendTestForbidDynamicCall::callStatic() dynamically
30