Formatted Code Embedding does not adhere to selected language

This issue was reported to me by the coworker who manages our developer group/forum. He (not surprisingly) posts a lot of code snippets in his content, as do our members. He recently noticed that when selecting the language in Insert > Code, the embedded snippets do not always respect the language selection. 

This was the example he sent me, comparing it against Confluence:

When testing in Community, I set the embeddable to be PHP and inserted PHP code (resulting in no color markup): 

if (is_array($names)) {
    var_dump(implode(', ', $names));
}

// or

$pieces = is_array($names) ? $names : [];
var_dump(implode(', ', $pieces));

But if I add <?php to the beginning of the code, it displays as expected:

<?php
if (is_array($names)) {
    var_dump(implode(', ', $names));
}

// or

$pieces = is_array($names) ? $names : [];
var_dump(implode(', ', $pieces));

This workaround works, but it seems to make the language selector somewhat pointless, as he (and other users) would be required to add <?php to every code example. I feel like this is a bug as that's not the expected functionality, but I'm not sure if anyone else has run into this and has any suggestions? 

(I'm currently on 12.1.4.25057, but added the same code embeddables in this post to verify it still happens in 13.x)