3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class C { /** * A-Z, 2-7 * New RFC that obsoleted RFC3548, uses the same alphabet. * * @var int */ const RFC4648 = 1; /** * 0-9, A-V * "Extended hex" or "base32hex" * * @var int */ const RFC2938 = 2; /** * 0-9, A-Z without I, L, O, U * * @link http://www.crockford.com/wrmg/base32.html * @var int */ const CROCKFORD = 3; /** * @var string */ const PAD_CHAR = '='; const ENCODE = 1; const DECODE = 1; /** * @var array */ protected $alphabet = [ self::RFC4648 =>[ self::ENCODE => [], self::DECODE => [], ], self::RFC2938 => [ self::ENCODE => [], self::DECODE => [], ], self::CROCKFORD => [ self::ENCODE => [], self::DECODE => [], ], ]; public function getAlphabet() { return $this->alphabet; } } $c = new C(); print_r($c->getA());
based on 0fDlN
Output for 7.0.0 - 7.2.0
Fatal error: Uncaught Error: Call to undefined method C::getA() in /in/GNDj8:64 Stack trace: #0 {main} thrown in /in/GNDj8 on line 64
Process exited with code 255.
Output for 5.4.2 - 5.6.28
Fatal error: Call to undefined method C::getA() in /in/GNDj8 on line 64
Process exited with code 255.
Output for 5.3.18 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/GNDj8 on line 41
Process exited with code 255.