function _reset_tree_nodes($poff, $low, $high)
	{
		if ($low <= $high)
		{
			$mid = ($low+$high)>>1;
			$node = $this->_sync_nodes[$mid];
			$buf = pack('II', $node['off'], $node['len']);

			// left
			$this->_reset_tree_nodes($node['off'], $low, $mid - 1);
			// right
			$this->_reset_tree_nodes($node['off'] + 8, $mid + 1, $high);
		}
		else
		{
			$buf = pack('II', 0, 0);
		}

		fseek($this->fd, $poff, SEEK_SET);
		fwrite($this->fd, $buf, 8);
	}
function _reset_tree_nodes($poff, $low, $high)
	{
		if ($low <= $high)
		{
			$mid = ($low+$high)>>1;
			$node = $this->_sync_nodes[$mid];
			$buf = pack('II', $node['off'], $node['len']);

			// left
			$this->_reset_tree_nodes($node['off'], $low, $mid - 1);
			// right
			$this->_reset_tree_nodes($node['off'] + 8, $mid + 1, $high);
		}
		else
		{
			$buf = pack('II', 0, 0);
		}

		fseek($this->fd, $poff, SEEK_SET);
		fwrite($this->fd, $buf, 8);
	}
function _reset_tree_nodes ( $ poff , $ low , $ high ) { if ( $ low <= $ high ) { $ mid = ( $ low + $ high ) >> 1 ; $ node = $ this -> _sync_nodes [ $ mid ] ; $ buf = pack ( 'II' , $ node [ 'off' ] , $ node [ 'len' ] ) ; // left $ this -> _reset_tree_nodes ( $ node [ 'off' ] , $ low , $ mid - 1 ) ; // right $ this -> _reset_tree_nodes ( $ node [ 'off' ] + 8 , $ mid + 1 , $ high ) ; } else { $ buf = pack ( 'II' , 0 , 0 ) ; } fseek ( $ this -> fd , $ poff , SEEK_SET ) ; fwrite ( $ this -> fd , $ buf , 8 ) ; }
sync the tree
sync the tree