1--TEST-- 2Constants can be dereferenced as objects (even though they can't be objects) 3--FILE-- 4<?php 5 6const FOO = "foo"; 7class Bar { const FOO = "foo"; } 8 9try { 10 FOO->length(); 11} catch (Error $e) { 12 echo $e->getMessage(), "\n"; 13} 14 15try { 16 Bar::FOO->length(); 17} catch (Error $e) { 18 echo $e->getMessage(), "\n"; 19} 20 21?> 22--EXPECT-- 23Call to a member function length() on string 24Call to a member function length() on string 25