php snippets in html are being commented out

You don’t display anything in shorcode’s function, you just return what has to be displayed. Your code should be:

function phpTest() {
    return '<p>some text</p>'; 
}
add_shortcode('test', 'phpTest');

Update: if your function contains anything, which displays data, use it as follows:

function phpTest() {
    ob_start();
    // your code goes here
    return ob_get_clean(); 
}
add_shortcode('test', 'phpTest');