<?php

function foo() {
	
	$x = 0;
	
	if (++$x >= 1) {
		echo "OK in func";
	}

}

$y = 0;

if (++$y >= 1) {
	echo "OK in root";
}