Master Page with extension .PHP don't managed properly

I’ve created a Master Page .php containing html page code.
On top page code I have inserted php script tags:

<?php
//code
?>

<!doctype html>

..........

Using this Master Page it work fine if I not using in the ‘slave page’ any php command placed in the “Master” php tags. eg:

<?php
  //code
  include 'somescript.php';
?>

<!doctype html>

..........

PHP work fine, but updating Master Page, the content of php script in slave page is cleaned. After Master Page is updated, slave page is:

<?php
  //code
?>

<!doctype html>

..........

I’m sorry, it’s possible insert code in the post instead of quote it? Because html tags cannot be showed.