var gulp            = require('gulp'),
    plumber         = require('gulp-plumber'),
    jade            = require('gulp-jade-php'),
    browserSync     = require('browser-sync');



// Pages
gulp.task('pages', function(){
  return gulp.src([gulp.paths.pages])
    .pipe(plumber({
      errorHandler: function (error) {
        console.log(error.message);
        this.emit('end');
    }}))
    .pipe(jade({
        pretty: !gulp.config.compressed,
        locals:{
          echo:function(str){
              return "<?php echo $"+str+"; ?>"
          }
        }
    }))
    .pipe(gulp.dest(gulp.paths.pagesDest))
    .pipe(browserSync.reload({stream:true}));

  browserSync.reload();
});

@@ -475,16 +475,17 @@
    echo:
+ 
 function
@@ -489,16 +489,17 @@
 ion(
+ 
 str
-)%7B%0A  
+ ) %7B%0A
     
@@ -539,16 +539,102 @@
 +%22; ?%3E%22%0A
+          %7D,%0A          php: function( str ) %7B%0A            return %22%3C?php $%22+str+%22; ?%3E%22%0A
         

Add local function "php"