1--TEST-- 2Can define die and exit as class methods, constants and property 3--FILE-- 4<?php 5 6class Foo { 7 public $exit; 8 public $die; 9 10 const die = 5; 11 const exit = 10; 12 13 public function exit() { 14 return 20; 15 } 16 17 public function die() { 18 return 15; 19 } 20} 21 22var_dump(Foo::die); 23var_dump(Foo::exit); 24$o = new Foo(); 25var_dump($o->exit); 26var_dump($o->die); 27var_dump($o->exit()); 28var_dump($o->die()); 29 30?> 31--EXPECT-- 32int(5) 33int(10) 34NULL 35NULL 36int(20) 37int(15) 38