File: 027.phpt

package info (click to toggle)
php-uopz 7.1.1%2B%2B-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 688 kB
  • sloc: ansic: 2,137; xml: 335; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 332 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--TEST--
init method call non string method
--EXTENSIONS--
uopz
--FILE--
<?php
class Foo {
	public function method() {
		return false;
	}
}

$foo = new Foo();
$method = 1;

var_dump($foo->$method());

?>
--EXPECTF--
Fatal error: Uncaught Error: Method name must be a string in %s:11
Stack trace:
#0 {main}
  thrown in %s on line 11