1--TEST-- 2Can use readonly as a function name 3--FILE-- 4<?php 5 6function readonly() { 7 echo "Hi!\n"; 8} 9 10class A { 11 const readonly = 'Const hi!'; 12 13 static function readonly() { 14 echo "Static hi!\n"; 15 } 16} 17 18class B { 19 public $readonly = 'Prop hi!'; 20 21 function readonly() { 22 echo "Instance hi!\n"; 23 } 24} 25 26$b = new B(); 27 28readonly(); 29echo A::readonly, "\n"; 30A::readonly(); 31$b->readonly(); 32echo $b->readonly, "\n"; 33 34?> 35--EXPECT-- 36Hi! 37Const hi! 38Static hi! 39Instance hi! 40Prop hi! 41