3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class ArrayPath { const DEFAULT_SEPARATOR = '.'; static private $_sSeparator; public function setSeparator($sSeparator = self::DEFAULT_SEPARATOR) { self::$_sSeparator = $sSeparator; } public function getSeparator() { return self::$_sSeparator ?: self::DEFAULT_SEPARATOR; } } var_dump((new ArrayPath)->setSeparator('/')); var_dump((new ArrayPath)->getSeparator());
based on j2Dts
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.0 - 7.3.0rc3
NULL string(1) "/"