protected function mergeOutput(array $left, array $right)
	{
		if (empty($left))
		{
			return $right;
		}

		if (empty($right))
		{
			return $left;
		}

		// Test whether we can merge the last expression on the left with the first expression on
		// the right
		$k = count($left) - 1;

		if (substr($left[$k], -1) === "'" && $right[0][0] === "'")
		{
			$right[0] = substr($left[$k], 0, -1) . substr($right[0], 1);
			unset($left[$k]);
		}

		return array_merge($left, $right);
	}
protected function mergeOutput(array $left, array $right)
	{
		if (empty($left))
		{
			return $right;
		}

		if (empty($right))
		{
			return $left;
		}

		// Test whether we can merge the last expression on the left with the first expression on
		// the right
		$k = count($left) - 1;

		if (substr($left[$k], -1) === "'" && $right[0][0] === "'")
		{
			$right[0] = substr($left[$k], 0, -1) . substr($right[0], 1);
			unset($left[$k]);
		}

		return array_merge($left, $right);
	}
protected function mergeOutput ( array $ left , array $ right ) { if ( empty ( $ left ) ) { return $ right ; } if ( empty ( $ right ) ) { return $ left ; } // Test whether we can merge the last expression on the left with the first expression on // the right $ k = count ( $ left ) - 1 ; if ( substr ( $ left [ $ k ] , - 1 ) === "'" && $ right [ 0 ] [ 0 ] === "'" ) { $ right [ 0 ] = substr ( $ left [ $ k ] , 0 , - 1 ) . substr ( $ right [ 0 ] , 1 ) ; unset ( $ left [ $ k ] ) ; } return array_merge ( $ left , $ right ) ; }
Merge two consecutive series of consecutive output expressions together

@param  array $left  First series
@param  array $right Second series
@return array        Merged series
Merge two consecutive series of consecutive output expressions together