ERROR the member if is not valid. valid members are dependon, name, value

Environment EnvironmentalPath
{
if ($Node.Environment -eq ‘Dev’)

        Ensure = 'Present'
        Name = "Path"
        Value = ";;c:\php\ext\"
        Path = $true
    }

You have to use if outside of resource block something like this:

if ($Node.Environment -eq ‘Dev’)
{
Environment EnvironmentalPath
{
Ensure = ‘Present’
Name = “Path”
Value = “;;c:\php\ext”
Path = $true
}
}

Only resource properties are allowed inside resource block.