protected function lock($js)
	{
		/* lock things like <code>"asd" + ++x;</code> */
		$lock = '"LOCK---' . crc32(time()) . '"';

		$matches = array();
		preg_match('/([+-])(\s+)([+-])/S', $js, $matches);
		if (empty($matches))
		{
			return $js;
		}

		$this->locks[$lock] = $matches[2];

		$js = preg_replace('/([+-])\s+([+-])/S', "$1{$lock}$2", $js);

		/* -- */

		return $js;
	}
protected function lock($js)
	{
		/* lock things like <code>"asd" + ++x;</code> */
		$lock = '"LOCK---' . crc32(time()) . '"';

		$matches = array();
		preg_match('/([+-])(\s+)([+-])/S', $js, $matches);
		if (empty($matches))
		{
			return $js;
		}

		$this->locks[$lock] = $matches[2];

		$js = preg_replace('/([+-])\s+([+-])/S', "$1{$lock}$2", $js);

		/* -- */

		return $js;
	}
protected function lock ( $ js ) { /* lock things like <code>"asd" + ++x;</code> */ $ lock = '"LOCK---' . crc32 ( time ( ) ) . '"' ; $ matches = array ( ) ; preg_match ( '/([+-])(\s+)([+-])/S' , $ js , $ matches ) ; if ( empty ( $ matches ) ) { return $ js ; } $ this -> locks [ $ lock ] = $ matches [ 2 ] ; $ js = preg_replace ( '/([+-])\s+([+-])/S' , "$1{$lock}$2" , $ js ) ; /* -- */ return $ js ; }
Replace patterns in the given string and store the replacement

@param  string $js The string to lock

@return bool
Replace patterns in the given string and store the replacement