3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Abc { public const TICKET_SEND_AUTO_RESPONSE = 0; public function test() { $s = <<<XML <sendautoresponder>self::TICKET_SEND_AUTO_RESPONSE</sendautoresponder> XML; return $s; } } $t = new Abc(); var_dump($t->test());
based on d2pFa
Output for 7.1.0 - 7.3.0rc3
string(82) " <sendautoresponder>self::TICKET_SEND_AUTO_RESPONSE</sendautoresponder>"
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.0.20
Parse error: syntax error, unexpected 'const' (T_CONST), expecting variable (T_VARIABLE) in /in/s1jpc on line 5
Process exited with code 255.
Output for hhvm-3.15.4
Fatal error: Uncaught Error: syntax error, unexpected T_CONST, expecting T_VARIABLE in /in/s1jpc:5 Stack trace: #0 {main}
Process exited with code 255.