title: Use gulp-replace-task to use replace in a php file (index.php)
body: <p>I'm trying to use <a href="https://www.npmjs.com/package/gulp-replace-task" rel="nofollow">gulp-replace-task</a> to replace text inside the <code>index.php</code> file. I know this can be done inside a <code>.html</code>, <code>.css</code> and <code>.js</code> file, but can't seem to get it working inside a <code>.php</code> file.</p>
  
  <p>Can somebody please help me?</p>
  
  <p>This is my code:</p>
  
  <pre><code>gulp.task('header', function() {
  
  return gulp.src(rootPath + 'templates/header.php')
  
      .pipe(replace({
          patterns: [{
              json: {
                  'main.css': 'style.css'
              }
          }]
      }))
      // Save the hashed css file
      .pipe(gulp.dest(rootPath + 'templates/header.php'));
  });
  </code></pre>