 
       phpEx = 'get_user_functions.php'
 
-    proc = exec.spawn 'php', [__dirname + '/php/' + phpEx]
+    if process.platform is 'win32'
+      proc = exec.spawn 'cmd', ['/S', '/C', __dirname + '/php/' + phpEx]
+    else
+      proc = exec.spawn 'php', [__dirname + '/php/' + phpEx]
+
     proc.stdout.pipe process.stdout
 
-    proc.stdin.setEncoding('utf8')
     proc.stdin.write(editor.getText())
     proc.stdin.end()
 

        @userFuncs = JSON.parse('' + data)

      @lastPath = editor.getPath()
      @lastTimeEx = new Date()

    proc.stderr.on 'data', (data) ->
      console.log 'err: ' + data

  # {editor, bufferPosition, scopeDescriptor, prefix}
  getSuggestions: (request) ->
    new Promise (resolve) =>
      # if @lastTimeEx? and Math.floor((new Date() - @lastTimeEx) / 60000) < 1
      #   typeEx = false
      # else
      #   typeEx = true

      typeEx = true

      if @notShowAutocomplete(request)
        resolve([])
