3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class Example { const FOO = 'bar'; public function __construct($b) { define('BAR', 'foo'); $this->FOO = $b; } } $example = new Example('hippy'); var_dump($example::FOO);
based on IiABK
Output for 5.6.0 - 7.3.0beta1
string(3) "bar"