更改Eclipse Oxygen中的PHP语言库 [英] Change PHP Language Library in eclipse Oxygen

查看:57
本文介绍了更改Eclipse Oxygen中的PHP语言库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

用于PHP开发人员的Eclipse版本:氧气释放(4.7.0)版本号:20170620-1800

如何将 PHP语言库更改为PHP 7(请参见下面的屏幕)?该项目来自以前的eclipse版本,该版本已导入Oxygen.在未安装PHP的计算机上,我将 Xdebug 与Linux VM配合使用,工作区位于该VM的samba共享上(在Apache上运行PHP 7.0).

在首选项中,我可以添加PHP路径,但是无法访问Linux VM上的PHP目录.但是,当我在eclipse中创建一个新的PHP项目时,我可以选择一个PHP版本(包括7.0).

我想知道是否是唯一的机会来创建一个新的PHP 7.0项目并复制我的文件,还是有办法将PHP 5.6更改为PHP 7.0?

基于

Eclipse for PHP Developers Version: Oxygen Release (4.7.0) Build id: 20170620-1800

How can I change the PHP Language Library to PHP 7 (see screen below)? The project results from a previous eclipse version which has been imported to Oxygen. On my machine no PHP is installed, I use Xdebug with a Linux VM, the workspace is on a samba share on that VM (runs PHP 7.0 on Apache).

In the preferences I can add PHP paths, but I have no access to the PHP directory on the Linux VM. But when I create a new PHP project in eclipse, I can select a PHP version (including 7.0).

I wonder if it is the only chance to create a new PHP 7.0 project and copy my files over, or is there a way to alter the PHP 5.6 to PHP 7.0?

Edit: based on howlger's answer

Yes, PHP validation solves it.

I was looking under Validation where is no such thing

解决方案

  1. Right-click on the project folder and choose Properties
  2. In the properties dialog, in PHP > Validation

    1. Enable project specific settings
    2. As PHP Version choose
      • 7.0 (uniform variable syntax, scalar type hint,...) or
      • 7.1 (void return types, class constant visibility,...)

You also might configure installed PHPs: Window > Properties: PHP > Installed PHPs

See also PHP help: PHP Interpreter Properties

这篇关于更改Eclipse Oxygen中的PHP语言库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆