3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Transliterator { const FORWARD = 0; const REVERSE = 1; public $id; public function __construct() { } /** * @param string $id * @param int $direction * @return Transliterator */ public static function create( $id, $direction = 0 ) { } /** * @param string $id * @param int $direction * @return Transliterator */ public static function createFromRules( $rules, $direction = 0 ) { } /** * @return Transliterator */ public function createInverse() { } /** * @return int */ public function getErrorCode() { } /** * @return string */ public function getErorMessage() { } /** * @return array */ public static function listIDs() { } /** * @param string $subject * @param int $start * @param int $end * @return string */ public function transliterate( $subject, $start = 0, $end = -1 ) { } }
Output for 8.4.1
Fatal error: Cannot redeclare class Transliterator in /in/Dq206 on line 3
Process exited with code 255.
Output for 7.1.25 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.32, 8.0.0 - 8.0.12, 8.0.14 - 8.0.30, 8.1.0 - 8.1.30, 8.2.0 - 8.2.26, 8.3.0 - 8.3.14
Fatal error: Cannot declare class Transliterator, because the name is already in use in /in/Dq206 on line 3
Process exited with code 255.
Output for 7.3.32 - 7.3.33, 7.4.33, 8.0.13

preferences:
61.59 ms | 408 KiB | 5 Q