1 2 3 4 5 6 7 8 9 10 11 12 13 14
--TEST-- Literal compaction should take method calls on literals into account --FILE-- <?php try { (42)->foo(); } catch (Error $e) { echo $e->getMessage(), "\n"; } ?> --EXPECT-- Call to a member function foo() on integer