3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr = [ 'number_of_shards' => 1, 'number_of_replicas' => 1, 'mapper.dynamic' => false, 'analysis' => [ "char_filter" => [ "eng_ru_key" => [ "type" => "mapping", "mappings" => [ "a => ф", "b => и", "c => с", "d => в", "e => у", "f => а", "g => п", "h => р", "i => ш", "j => о", "k => л", "l => д", "m => ь", "n => т", "o => щ", "p => з", "r => к", "s => ы", "t => е", "u => г", "v => м", "w => ц", "x => ч", "y => н", "z => я", "A => Ф", "B => И", "C => С", "D => В", "E => У", "F => А", "G => П", "H => Р", "I => Ш", "J => О", "K => Л", "L => Д", "M => Ь", "N => Т", "O => Щ", "P => З", "R => К", "S => Ы", "T => Е", "U => Г", "V => М", "W => Ц", "X => Ч", "Y => Н", "Z => Я", "[ => х", "] => ъ", "; => ж", ", => б", ". => ю", "< => Б", "> => Ю", ] ], "rus_en_key" => [ "type" => "mapping", "mappings" => [ "ф => a", "и => b", "с => c", "в => d", "у => e", "а => f", "п => g", "р => h", "ш => i", "о => j", "л => k", "д => l", "ь => m", "т => n", "щ => o", "з => p", "к => r", "ы => s", "е => t", "г => u", "м => v", "ц => w", "ч => x", "н => y", "я => z", "Ф => A", "И => B", "С => C", "В => D", "У => E", "А => F", "П => G", "Р => H", "Ш => I", "О => J", "Л => K", "Д => L", "Ь => M", "Т => N", "Щ => O", "З => P", "К => R", "Ы => S", "Е => T", "Г => U", "М => V", "Ц => W", "Ч => X", "Н => Y", "Я => Z", "х => [", "ъ => ]", "ж => ;", "б => ,", "ю => .", "Б => <", "Ю => >", ] ], "trans_ru_to_eng" => [ "type" => "mapping", "mappings" => [ 'а => a', 'б => b', 'в => v', 'г => g', 'д => d', 'е => e', 'ё => e', 'ж => zh', 'з => z', 'и => i', 'й => y', 'к => k', 'л => l', 'м => m', 'н => n', 'о => o', 'п => p', 'р => r', 'с => s', 'т => t', 'у => u', 'ф => f', 'х => h', 'ц => c', 'ч => ch', 'ш => sh', 'щ => sch', 'ь => \'', 'ы => y', 'ъ => \'', 'э => e', 'ю => yu', 'я => ya', 'А => A', 'Б => B', 'В => V', 'Г => G', 'Д => D', 'Е => E', 'Ё => E', 'Ж => Zh', 'З => Z', 'И => I', 'Й => Y', 'К => K', 'Л => L', 'М => M', 'Н => N', 'О => O', 'П => P', 'Р => R', 'С => S', 'Т => T', 'У => U', 'Ф => F', 'Х => H', 'Ц => C', 'Ч => Ch', 'Ш => Sh', 'Щ => Sch', 'Ь => \'', 'Ы => Y', 'Ъ => \'', 'Э => E', 'Ю => Yu', 'Я => Ya', ] ], "trans_en_to_rus" => [ "type" => "mapping", "mappings" => [ 'a => а', 'b => б', 'v => в', 'g => г', 'd => д', 'e => е', 'zh => ж', 'z => з', '\' => ь', 'i => и', 'y => й', 'k => к', 'l => л', 'm => м', 'n => н', 'o => о', 'p => п', 'r => р', 's => с', 't => т', 'u => у', 'f => ф', 'h => х', 'c => ц', 'ch => ч', 'sh => ш', 'sch => щ', 'yu => ю', 'ya => я', 'A => А', 'B => Б', 'V => В', 'G => Г', 'D => Д', 'E => Е', 'Zh => Ж', 'Z => З', 'I => И', 'Y => Й', 'K => К', 'L => Л', 'M => М', 'N => Н', 'O => О', 'P => П', 'R => Р', 'S => С', 'T => Т', 'U => У', 'F => Ф', 'H => Х', 'C => Ц', 'Ch => Ч', 'Sh => Ш', 'Sch => Щ', 'Yu => Ю', 'Ya => Я', ] ], "synonyms" => [ "type" => "mapping", ], ], 'analyzer' => [ 'ru' => [ "char_filter" => [ "synonyms" ], 'tokenizer' => 'standard', "filter" => [ 'lowercase', 'ru_stopwords', 'ru_stemming', 'russian_morphology', 'english_morphology', ], ], "rus_en_key_analyzer" => [ "char_filter" => [ "rus_en_key" ], "tokenizer" => "standard", "filter" => [ 'lowercase', 'ru_stopwords' ] ], "eng_ru_key_analyzer" => [ "char_filter" => [ "eng_ru_key" ], "tokenizer" => "standard", "filter" => [ 'lowercase', 'ru_stopwords' ] ], "eng_ru_transliteration_analyzer" => [ "char_filter" => [ "trans_en_to_rus" ], "tokenizer" => "standard", "filter" => [ 'lowercase', 'ru_stopwords' ] ], "rus_en_transliteration_analyzer" => [ "char_filter" => [ "trans_ru_to_eng" ], "tokenizer" => "standard", "filter" => [ 'lowercase', 'ru_stopwords' ] ], ], 'filter' => [ 'ru_stopwords' => [ 'type' => 'stop', 'stopwords' => 'а,без,более,бы,был,была,были,было,быть,в,вам,вас,весь' . ',во,вот,все,всего,всех,вы,где,да,даже,для,до,его,ее,если,есть,еще,' . 'же,за,здесь,и,из,или,им,их,к,как,ко,когда,кто,ли,либо,мне,может,' . 'мы,на,надо,наш,не,него,нее,нет,ни,них,но,ну,о,об,однако,он,она,они,' . 'оно,от,очень,по,под,при,с,со,так,также,такой,там,те,тем,то,того,тоже,' . 'той,только,том,ты,у,уже,хотя,чего,чей,чем,что,чтобы,чье,чья,эта,эти,' . 'это,я,a,an,and,are,as,at,be,but,by,for,if,in,into,is,it,no,not,of,on,' . 'or,such,that,the,their,then,there,these,they,this,to,was,will,with', ], 'ru_stemming' => [ 'type' => 'stemmer', 'language' => 'russian', ], ], ] ]; echo json_encode($arr);
based on egMXE
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.2.0
{"number_of_shards":1,"number_of_replicas":1,"mapper.dynamic":false,"analysis":{"char_filter":{"eng_ru_key":{"type":"mapping","mappings":["a => \u0444","b => \u0438","c => \u0441","d => \u0432","e => \u0443","f => \u0430","g => \u043f","h => \u0440","i => \u0448","j => \u043e","k => \u043b","l => \u0434","m => \u044c","n => \u0442","o => \u0449","p => \u0437","r => \u043a","s => \u044b","t => \u0435","u => \u0433","v => \u043c","w => \u0446","x => \u0447","y => \u043d","z => \u044f","A => \u0424","B => \u0418","C => \u0421","D => \u0412","E => \u0423","F => \u0410","G => \u041f","H => \u0420","I => \u0428","J => \u041e","K => \u041b","L => \u0414","M => \u042c","N => \u0422","O => \u0429","P => \u0417","R => \u041a","S => \u042b","T => \u0415","U => \u0413","V => \u041c","W => \u0426","X => \u0427","Y => \u041d","Z => \u042f","[ => \u0445","] => \u044a","; => \u0436",", => \u0431",". => \u044e","< => \u0411","> => \u042e"]},"rus_en_key":{"type":"mapping","mappings":["\u0444 => a","\u0438 => b","\u0441 => c","\u0432 => d","\u0443 => e","\u0430 => f","\u043f => g","\u0440 => h","\u0448 => i","\u043e => j","\u043b => k","\u0434 => l","\u044c => m","\u0442 => n","\u0449 => o","\u0437 => p","\u043a => r","\u044b => s","\u0435 => t","\u0433 => u","\u043c => v","\u0446 => w","\u0447 => x","\u043d => y","\u044f => z","\u0424 => A","\u0418 => B","\u0421 => C","\u0412 => D","\u0423 => E","\u0410 => F","\u041f => G","\u0420 => H","\u0428 => I","\u041e => J","\u041b => K","\u0414 => L","\u042c => M","\u0422 => N","\u0429 => O","\u0417 => P","\u041a => R","\u042b => S","\u0415 => T","\u0413 => U","\u041c => V","\u0426 => W","\u0427 => X","\u041d => Y","\u042f => Z","\u0445 => [","\u044a => ]","\u0436 => ;","\u0431 => ,","\u044e => .","\u0411 => <","\u042e => >"]},"trans_ru_to_eng":{"type":"mapping","mappings":["\u0430 => a","\u0431 => b","\u0432 => v","\u0433 => g","\u0434 => d","\u0435 => e","\u0451 => e","\u0436 => zh","\u0437 => z","\u0438 => i","\u0439 => y","\u043a => k","\u043b => l","\u043c => m","\u043d => n","\u043e => o","\u043f => p","\u0440 => r","\u0441 => s","\u0442 => t","\u0443 => u","\u0444 => f","\u0445 => h","\u0446 => c","\u0447 => ch","\u0448 => sh","\u0449 => sch","\u044c => '","\u044b => y","\u044a => '","\u044d => e","\u044e => yu","\u044f => ya","\u0410 => A","\u0411 => B","\u0412 => V","\u0413 => G","\u0414 => D","\u0415 => E","\u0401 => E","\u0416 => Zh","\u0417 => Z","\u0418 => I","\u0419 => Y","\u041a => K","\u041b => L","\u041c => M","\u041d => N","\u041e => O","\u041f => P","\u0420 => R","\u0421 => S","\u0422 => T","\u0423 => U","\u0424 => F","\u0425 => H","\u0426 => C","\u0427 => Ch","\u0428 => Sh","\u0429 => Sch","\u042c => '","\u042b => Y","\u042a => '","\u042d => E","\u042e => Yu","\u042f => Ya"]},"trans_en_to_rus":{"type":"mapping","mappings":["a => \u0430","b => \u0431","v => \u0432","g => \u0433","d => \u0434","e => \u0435","zh => \u0436","z => \u0437","' => \u044c","i => \u0438","y => \u0439","k => \u043a","l => \u043b","m => \u043c","n => \u043d","o => \u043e","p => \u043f","r => \u0440","s => \u0441","t => \u0442","u => \u0443","f => \u0444","h => \u0445","c => \u0446","ch => \u0447","sh => \u0448","sch => \u0449","yu => \u044e","ya => \u044f","A => \u0410","B => \u0411","V => \u0412","G => \u0413","D => \u0414","E => \u0415","Zh => \u0416","Z => \u0417","I => \u0418","Y => \u0419","K => \u041a","L => \u041b","M => \u041c","N => \u041d","O => \u041e","P => \u041f","R => \u0420","S => \u0421","T => \u0422","U => \u0423","F => \u0424","H => \u0425","C => \u0426","Ch => \u0427","Sh => \u0428","Sch => \u0429","Yu => \u042e","Ya => \u042f"]},"synonyms":{"type":"mapping"}},"analyzer":{"ru":{"char_filter":["synonyms"],"tokenizer":"standard","filter":["lowercase","ru_stopwords","ru_stemming","russian_morphology","english_morphology"]},"rus_en_key_analyzer":{"char_filter":["rus_en_key"],"tokenizer":"standard","filter":["lowercase","ru_stopwords"]},"eng_ru_key_analyzer":{"char_filter":["eng_ru_key"],"tokenizer":"standard","filter":["lowercase","ru_stopwords"]},"eng_ru_transliteration_analyzer":{"char_filter":["trans_en_to_rus"],"tokenizer":"standard","filter":["lowercase","ru_stopwords"]},"rus_en_transliteration_analyzer":{"char_filter":["trans_ru_to_eng"],"tokenizer":"standard","filter":["lowercase","ru_stopwords"]}},"filter":{"ru_stopwords":{"type":"stop","stopwords":"\u0430,\u0431\u0435\u0437,\u0431\u043e\u043b\u0435\u0435,\u0431\u044b,\u0431\u044b\u043b,\u0431\u044b\u043b\u0430,\u0431\u044b\u043b\u0438,\u0431\u044b\u043b\u043e,\u0431\u044b\u0442\u044c,\u0432,\u0432\u0430\u043c,\u0432\u0430\u0441,\u0432\u0435\u0441\u044c,\u0432\u043e,\u0432\u043e\u0442,\u0432\u0441\u0435,\u0432\u0441\u0435\u0433\u043e,\u0432\u0441\u0435\u0445,\u0432\u044b,\u0433\u0434\u0435,\u0434\u0430,\u0434\u0430\u0436\u0435,\u0434\u043b\u044f,\u0434\u043e,\u0435\u0433\u043e,\u0435\u0435,\u0435\u0441\u043b\u0438,\u0435\u0441\u0442\u044c,\u0435\u0449\u0435,\u0436\u0435,\u0437\u0430,\u0437\u0434\u0435\u0441\u044c,\u0438,\u0438\u0437,\u0438\u043b\u0438,\u0438\u043c,\u0438\u0445,\u043a,\u043a\u0430\u043a,\u043a\u043e,\u043a\u043e\u0433\u0434\u0430,\u043a\u0442\u043e,\u043b\u0438,\u043b\u0438\u0431\u043e,\u043c\u043d\u0435,\u043c\u043e\u0436\u0435\u0442,\u043c\u044b,\u043d\u0430,\u043d\u0430\u0434\u043e,\u043d\u0430\u0448,\u043d\u0435,\u043d\u0435\u0433\u043e,\u043d\u0435\u0435,\u043d\u0435\u0442,\u043d\u0438,\u043d\u0438\u0445,\u043d\u043e,\u043d\u0443,\u043e,\u043e\u0431,\u043e\u0434\u043d\u0430\u043a\u043e,\u043e\u043d,\u043e\u043d\u0430,\u043e\u043d\u0438,\u043e\u043d\u043e,\u043e\u0442,\u043e\u0447\u0435\u043d\u044c,\u043f\u043e,\u043f\u043e\u0434,\u043f\u0440\u0438,\u0441,\u0441\u043e,\u0442\u0430\u043a,\u0442\u0430\u043a\u0436\u0435,\u0442\u0430\u043a\u043e\u0439,\u0442\u0430\u043c,\u0442\u0435,\u0442\u0435\u043c,\u0442\u043e,\u0442\u043e\u0433\u043e,\u0442\u043e\u0436\u0435,\u0442\u043e\u0439,\u0442\u043e\u043b\u044c\u043a\u043e,\u0442\u043e\u043c,\u0442\u044b,\u0443,\u0443\u0436\u0435,\u0445\u043e\u0442\u044f,\u0447\u0435\u0433\u043e,\u0447\u0435\u0439,\u0447\u0435\u043c,\u0447\u0442\u043e,\u0447\u0442\u043e\u0431\u044b,\u0447\u044c\u0435,\u0447\u044c\u044f,\u044d\u0442\u0430,\u044d\u0442\u0438,\u044d\u0442\u043e,\u044f,a,an,and,are,as,at,be,but,by,for,if,in,into,is,it,no,not,of,on,or,such,that,the,their,then,there,these,they,this,to,was,will,with"},"ru_stemming":{"type":"stemmer","language":"russian"}}}}