1--TEST-- 2Dynamic static call of non-static method 3--FILE-- 4<?php 5class Foo { 6 function test1() { 7 $method = ['Foo', 'bar']; 8 $method(); 9 } 10 function test2() { 11 $method = 'Foo::bar'; 12 $method(); 13 } 14 function __call($name, $args) {} 15} 16$x = new Foo; 17try { 18 $x->test1(); 19} catch (Error $e) { 20 echo $e->getMessage(), "\n"; 21} 22try { 23 $x->test2(); 24} catch (Error $e) { 25 echo $e->getMessage(), "\n"; 26} 27?> 28--EXPECT-- 29Non-static method Foo::bar() cannot be called statically 30Non-static method Foo::bar() cannot be called statically 31