<?php
// O resultado desta linha é I ou II ou III;
$subsecao = "I";
echo "::$subsecao::";
echo "<br>";
// O resultado desta linha é string;
echo "<br>";
// Faço um switch para atribuir um caso, mas, retorna apenas o default;
switch ($subsecao){
case "I":
$subsecao = "1";
break;
case "II":
$subsecao = "2";
break;
case "III":
$subsecao = "3";
break;
default:
$subsecao = "Não encontrou";
}
// O resultado desta linha é "Não encontrou";
echo $subsecao;
echo "<br>";
// O resultado desta linha é string;
echo "<br>";
PD9waHAKICAgICAgICAgICAvLyBPIHJlc3VsdGFkbyBkZXN0YSBsaW5oYSDDqSBJIG91IElJIG91IElJSTsKICAgICAgICAgICAkc3Vic2VjYW8gPSAiSSI7CiAgICAgICAgICAgCiAgICAgICAgICAgZWNobyAiOjokc3Vic2VjYW86OiI7CiAgICAgICAgICAgZWNobyAiPGJyPiI7CiAgICAgICAgICAgLy8gTyByZXN1bHRhZG8gZGVzdGEgbGluaGEgw6kgc3RyaW5nOwogICAgICAgICAgIGVjaG8gZ2V0dHlwZSgkc3Vic2VjYW8pOwogICAgICAgICAgIGVjaG8gIjxicj4iOwogICAgICAgICAgIC8vIEZhw6dvIHVtIHN3aXRjaCBwYXJhIGF0cmlidWlyIHVtIGNhc28sIG1hcywgcmV0b3JuYSBhcGVuYXMgbyBkZWZhdWx0OwoKICAgICAgICAgIHN3aXRjaCAoJHN1YnNlY2FvKXsKICAgICAgICAgICAgY2FzZSAiSSI6CiAgICAgICAgICAgICAgJHN1YnNlY2FvID0gIjEiOwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlICJJSSI6CiAgICAgICAgICAgICAgJHN1YnNlY2FvID0gIjIiOwogICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICBjYXNlICJJSUkiOgogICAgICAgICAgICAgICRzdWJzZWNhbyA9ICIzIjsKICAgICAgICAgICAgICBicmVhazsgICAgCiAgICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgICAkc3Vic2VjYW8gPSAiTsOjbyBlbmNvbnRyb3UiOwogICAgICAgICAgfQoKICAgICAgICAgICAvLyBPIHJlc3VsdGFkbyBkZXN0YSBsaW5oYSDDqSAiTsOjbyBlbmNvbnRyb3UiOwogICAgICAgICAgIGVjaG8gJHN1YnNlY2FvOwogICAgICAgICAgIGVjaG8gIjxicj4iOwogICAgICAgICAgIC8vIE8gcmVzdWx0YWRvIGRlc3RhIGxpbmhhIMOpIHN0cmluZzsKICAgICAgICAgICBlY2hvIGdldHR5cGUoJHN1YnNlY2FvKTsKICAgICAgICAgICBlY2hvICI8YnI+Ijs=